【Unity】Getting Started with Unity Timeline: Creating Cutscenes and Cinematic Sequences

Created: 2026-02-05

Learn how to use Unity Timeline to manage animations, audio, and camera movement on a timeline. Covers creating cutscenes, cinematic sequences, and integrating with Cinemachine.

Overview

"I want to create a cutscene..." "I need a boss entrance sequence..." "I want movie-like camera work..."

In game development, you often face these kinds of cinematic challenges. Timeline is a feature that lets you edit and manage in-game animations, audio, and camera movements along a timeline. Using the same concept as video editing timelines, you can visually create event sequences without writing code.

Components

Timeline consists of the following elements.

ElementDescription
Timeline AssetAsset file that stores timeline configuration
Playable DirectorComponent attached to a GameObject that plays the Timeline
TrackTimeline axis that controls a specific element (animation, audio, etc.)
ClipIndividual element placed on a track

Main Track Types

Activation Track

Controls a GameObject's active/inactive state along the timeline. Used for enemy appearances, UI toggling, etc.

Animation Track

Plays existing animation clips or records keyframe animations directly within the Timeline. Controls character movement, object translation/rotation, etc.

Audio Track

Places BGM and sound effects on the timeline. Supports synchronized playback of multiple audio sources, as well as volume and pitch adjustment.

Control Track

Controls Prefabs, nested timelines, and Particle Systems.

Main use cases:

  • Nested Timeline: Plays another Timeline (for breaking complex sequences into manageable parts)
  • Particle System: Controls effect playback timing
  • Prefab instantiation: Spawns and destroys Prefabs at specific times

Signal Track

Fires events at specific times. Combined with a Signal Receiver, it communicates with external systems. Used for executing custom logic, updating UI, changing game state, etc.

Cinemachine Track

Controls Cinemachine virtual cameras. Switches between multiple camera views to achieve cinematic camera work.

Cinemachine 3.x key changes:

  • CinemachineVirtualCamera -> CinemachineCamera
  • CinemachineBrain settings integrated into the camera component
  • CinemachineComposer -> CinemachineRotationComposer
  • CinemachineTransposer -> CinemachineFollow
  • CinemachineOrbitalTransposer -> CinemachineOrbitalFollow

Check your Cinemachine version and use the appropriate component names.

Basic Usage

Setup Steps

1. Creating a Timeline Asset

  • Right-click in the Project window > Create > Timeline
  • Or open Window > Sequencing > Timeline and click the Create button

2. Setting Up the Playable Director

  • Create an empty GameObject
  • Drag and drop the Timeline asset onto the GameObject in the Hierarchy
  • A Playable Director component is automatically added

3. Adding Tracks

  • Click the "+" button or right-click in the Timeline window
  • Select the desired track type
  • Or drag and drop a GameObject into the Timeline window

4. Placing Clips

  • Drag animation clips or audio clips onto tracks
  • Or use Recording mode to directly record keyframes

Recording Mode

  1. Click the red circle button on the track to start recording
  2. Move along the timeline and change the object's Transform or properties
  3. Changes are automatically recorded as keyframes
  4. When you exit recording mode, an animation clip is generated

Recorded Clip: The generated clip is embedded within the Timeline asset as a Recorded Clip. You can later replace it with a regular AnimationClip or extract it to the Project window for reuse.

Cinemachine Integration

Cinemachine is Unity's advanced camera system that uses virtual cameras to achieve professional-quality camera work.

Integration Steps

1. Adding a Cinemachine Track

Add a "Cinemachine Track" to the Timeline and bind a camera that has a Cinemachine Brain component.

2. Placing Virtual Cameras

Place multiple Cinemachine Virtual Cameras in the scene and configure each with different angles and follow targets.

3. Creating Camera Shots

Drag and drop Virtual Cameras onto the Cinemachine Track. Adjust clip length to control camera display time, and arrange clips to create camera transitions.

4. Adjusting Blends

Adjust the blend time between clips to set up smooth camera transitions or hard cuts.

Practical Examples

Creating a Cutscene

  1. Plan the story flow
  2. Determine the required camera angles
  3. Place character animations
  4. Add dialogue and BGM
  5. Fine-tune camera work
  6. Add effects and UI

Game Opening Sequence

TrackContent
Activation TrackTitle logo display
Cinemachine TrackCamera zoom-in
Audio TrackBGM playback
Animation TrackUI fade-in
Signal TrackTransition to gameplay

Boss Entrance Sequence

TrackContent
Signal TrackStop player movement
Cinemachine TrackPoint camera at the boss
Animation TrackBoss entrance animation
Audio TrackSound effects and music playback
Activation TrackDisplay boss name
Signal TrackStart battle

Script Control

Timeline Playback Control

using UnityEngine;
using UnityEngine.Playables;

public class TimelineController : MonoBehaviour
{
    PlayableDirector director;

    void Start()
    {
        director = GetComponent<PlayableDirector>();
    }

    public void PlayTimeline()
    {
        director.Play();
    }

    public void PauseTimeline()
    {
        director.Pause();
    }

    public void StopTimeline()
    {
        director.Stop();
    }

    public void JumpToTime(double time)
    {
        director.time = time;
        director.Evaluate();  // Takes effect immediately even while paused
    }

    public void SetStartTime(double time)
    {
        director.initialTime = time;  // Set the playback start position
    }

    // Scrubbing: for linking with a slider
    public void OnSliderChanged(float normalizedTime)
    {
        director.time = normalizedTime * director.duration;
        director.Evaluate();  // Can also be used for preview
    }

    void OnEnable()
    {
        director.played += OnTimelinePlayed;
        director.paused += OnTimelinePaused;
        director.stopped += OnTimelineFinished;
    }

    void OnDisable()
    {
        director.played -= OnTimelinePlayed;
        director.paused -= OnTimelinePaused;
        director.stopped -= OnTimelineFinished;
    }

    void OnTimelinePlayed(PlayableDirector pd)
    {
        Debug.Log("Timeline started!");
    }

    void OnTimelinePaused(PlayableDirector pd)
    {
        Debug.Log("Timeline paused!");
    }

    void OnTimelineFinished(PlayableDirector pd)
    {
        Debug.Log("Timeline finished!");
    }
}

Using Signal Receivers

  1. Create a Signal Asset (right-click in Project > Create > Signal)
  2. Add a Signal Track and set the GameObject with a Signal Receiver in the bind field on the left side of the Timeline window
  3. Place a Signal Emitter on the Signal Track
  4. Add a Signal Receiver component to the GameObject
  5. Register methods for each Signal
using UnityEngine;

public class CutsceneEventHandler : MonoBehaviour
{
    // Methods called from the Signal Receiver
    public void OnBossAppear()
    {
        Debug.Log("The boss has appeared!");
        // Stop player movement, display UI, etc.
    }

    public void OnBattleStart()
    {
        Debug.Log("Battle start!");
        // Switch game state to combat mode
    }
}

Signal Receiver Setup Steps:

  1. Open the Signal Receiver component
  2. Click Add Reaction
  3. Select the Signal Asset to use
  4. Specify the target GameObject and method

Changing Bindings at Runtime

A common pattern in practice is changing track bindings at runtime.

// Example: Swapping in a different character
foreach (var output in director.playableAsset.outputs)
{
    if (output.streamName == "PlayerAnimation")
    {
        director.SetGenericBinding(output.sourceObject, newCharacter);
    }
}

Next steps: To create custom tracks, implement by inheriting from three classes: TrackAsset (the track itself), PlayableAsset (clip data), and PlayableBehaviour (runtime behavior).

Common Issues and Solutions

Issue 1: Timeline Won't Play

  • Check if Play On Awake is enabled on the Playable Director
  • Verify the Timeline asset is correctly assigned
  • Confirm the objects bound to tracks still exist

Issue 2: Animation Not Applying

  • Verify the Animator component is correctly bound to the Animation Track
  • Check for conflicts with other Animator layers or state machines
  • Make sure Recording mode has been exited

Resolving Animator and Animation Track Conflicts:

  • Use Avatar Mask to limit which parts Timeline controls
  • Adjust Track weight to control Timeline's influence
  • Disable the Animator's state machine during Timeline playback

Issue 3: Objects Revert After Playback

Check the Playable Director's Wrap Mode.

Wrap ModeBehavior
HoldMaintains the final frame state
LoopLoops playback
NoneReverts to the original state after playback

Common issue: With the default None, character positions and properties revert to their pre-playback state. For cutscenes, Hold is typically used.

Issue 3.5: Choosing Update Method

Select the Playable Director's Update Method based on your use case.

Update MethodUsage
Game TimeNormal gameplay (affected by Time.timeScale)
Unscaled Game TimePause menu UI, etc. (not affected by Time.timeScale)
DSP ClockWhen audio synchronization is critical
ManualWhen controlling entirely from script

Issue 4: Camera Not Switching

  • Verify Cinemachine Brain is attached to the main camera
  • Check that Virtual Camera priorities are set correctly
  • Confirm a Cinemachine Brain is bound to the Cinemachine Track

Issue 5: Signals Not Firing

  • Verify the Signal Receiver is attached to the correct GameObject
  • Check that the Signal Asset is assigned to the Signal Emitter
  • Confirm Reactions are registered in the Signal Receiver

Best Practices

Naming Conventions

  • Timeline assets: Timeline_CutsceneName
  • Tracks: Names that describe the role (e.g., Track_PlayerAnimation)
  • Signal Assets: Signal_EventName

Organization

  • Group related Timeline assets in dedicated folders
  • Organize tracks by type
  • Use markers to break up long Timelines

Performance

  • Remove unnecessary tracks and clips
  • Compress high-resolution animations
  • Split complex Timelines into smaller pieces
  • Use Addressables to load/unload as needed

Summary

Timeline is a powerful tool for creating cutscenes and cinematic sequences.

  • Activation Track - Control object visibility
  • Animation Track - Manage animations along a timeline
  • Audio Track - Place BGM and sound effects
  • Cinemachine Track - Achieve cinematic camera work
  • Signal Track - Fire events to integrate with game logic

You can visually create sequences without writing code, and achieve professional-quality camera work through Cinemachine integration.