Introduction to Timeline in Unity
Objective: learn how to use the timeline window in Unity.
The timeline window is accessed from the window toolbar at the top of the screen. Select Window -> Sequencing -> Timeline
After activating the timeline window, it’s a good idea to adjust the layout. We can put the timeline underneath the scene and game view like so:
Now that we have a timeline, we can create a new timeline for the cutscene by clicking the Create button and saving the timeline as a new asset. Once we are done with that, we can create a track by dragging the main camera into the timeline window and choosing “Add Cinemachine Track”.
We’ll need to add a Cinemachine Shot for each part of the cutscene. We can do so by right clicking the bar to the right of the track, and selecting “Add Cinemachine Shot”.
This creates a CinemachineShot in the track.
This shot appears in the inspector as well, and we need to assign the virtual camera from the hierarchy. This one will be the over-the-shoulder shot, so we drag that virtual camera into the virtual camera slot.
We don’t necessarily want this shot to last 5 seconds, so we can adjust it by dragging the edge of the shot within the track.
After setting up another shot in the track and assigning the “Mid Shot” virtual camera, we can test it out by pressing the play button in the timeline window. If everything is set up properly, we can see the camera shots switching in the game view.