Introduction to Timeline in Unity!

Objective: Understand what timeline is and how to implement into your project.

Timeline is a feature in Unity. It is an animation track that allows you to add and animate a time-lined event. With timeline you can create camera cuts, animate virtual cameras, pan cameras, create audio effects, and create activation tracks.

To access timeline you can go to window > Sequencing > Timeline.

By default the timeline window will open next to the scene view. However, personally, I move the window below the game view and place the game view and scene view side-by-side. This give you a view of both scene and game views so you can refocus your camera and create composition if you need to.

To begin you need to create a timeline asset. To do this select your cutscene you are working with and select create on the timeline window.

This will open a window for you to select where to save the timeline asset. I recommend making a folder for your timelines.

Saving will add an animation track to the timeline editor.

On your object and playable director component have been added. Playable director controls when your timeline asset is enabled and plays.

If you want to start animating between cameras you are going to need to bring in the CM braid from your main camera into the timeline. Select the main camera and drag it into the timeline.

Now you will be able to swap between virtual cameras. By default the numbers on the timeline are representing frames. To switch to seconds select the gear in the top right of the timeline view and select seconds.

It is time to add your virtual camera. Right click in the timeline > add Cinemachine shot clip. This added the cinemachine shot as well as in the inspector it added a cinemachine shot clip and it is needing a virtual camera.

Attach your virtual camera and it will be added to your timeline. You can then add multiple cameras and it will cut between the cameras automatically.

Using timeline will enable you to make dramatic cutscenes for your game. Take your time to learn what all you can and can’t do with this feature. Never be afraid to experiment with your code, and I’ll see you in the next tutorial.