Cinemachine and Timeline
Use Timeline to activate, deactivate, and blend between Virtual Cameras. In Timeline, combine Cinemachine with other GameObjects and assets to interactively implement and tune rich cutscenes, even interactive ones.
Tip: For simple shot sequences, use a Cinemachine Blend List Camera instead of Timeline.
Timeline overrides the priority-based decisions made by Cinemachine Brain. When the timeline finishes, control returns to the Cinemachine Brain, which chooses the Virtual Camera with the highest Priority setting.
You control Virtual Cameras in Timeline with a Cinemachine Shot Clip. Each shot clip points to a Virtual Camera to activate then deactivate. Use a sequence of shot clips to specify the order and duration of each shot.
To cut between two Virtual Cameras, place the clips next to each other. To blend between two Virtual Cameras, overlap the clips.
To create a Timeline for Cinemachine:
Create an empty GameObject in your Scene by choosing the __GameObject > Create Empty __menu item.
Give the empty GameObject a descriptive name. For example,
IntroTimeline
.In your Scene, select your empty Timeline object as the focus to create a Timeline Asset and instance.
Click the padlock button to lock the TImeline window to make it easier to add and adjust tracks.
Drag a Unity camera with a CinemachineBrain component onto the Timeline Editor, then choose Create Cinemachine Track from the drop-down menu.
Add other tracks to the Timeline for controlling the subjects of your Scene. For example, add an Animation track to animate your main character.
Tip: Delete the default track that refers to your Timeline object. This track isn’t necessary for Timeline. For example, in the Timeline editor, right-click the track for IntroTimeline and choose Delete.
To add Cinemachine Shot Clips to a Cinemachine Track:
In the Cinemachine Track, right-click and choose Add Cinemachine Shot Clip.
Do one of the following:
To add an existing Virtual Camera to the shot clip, drag and drop it onto the Virtual Camera property in the Cinemachine Shot component.
To create a new Virtual Camera and add it to the shot clip, click Create in the Cinemachine Shot component.
In the Timeline editor, adjust the order, duration, cutting, and blending of the shot clip.
Adjust the properties of the Virtual Camera to place it in the Scene and specify what to aim at or follow.
To animate properties of the Virtual Camera, create an Animation Track for it and animate as you would any other GameObject.
Organize your Timeline tracks to fine-tune your Scene.