Intro to Unity Timeline (part 1)

Working with Virtual Cameras and Understanding Timelines

Within Unity, there is a very handy feature which allows users to control animations and game objects and multiple Cinemachine cameras and turn them into a cutscene. This feature is called “Timeline”. In Timeline, users are able to direct the angles and positions of the cameras, and also switch between different cameras all while having the object animate in real time.

Cinemachine

Before we start with the Timeline, we first have to set up the cameras which dictates the cutscene. In my scene I will have 2 cameras, one facing over the shoulder of my character and another facing the front of my character.

The two views of my cutscene

Timeline

To show the timeline go to Window > Sequencing > Timeline, I personally like to drag the timeline window and lock it on the bottom section.

Just like the Animation tab, the Timeline tab starts out blank. To start populating it, you first must create an Director on the game object you wish to have your cutscene. Since I will be having several different cutscenes, I organized the hierarchy accordingly where every individual cutscene is housed in one empty game object. This empty game object is what going to contain the the timeline information. Therefore, select this game object, and on the Timeline window, click create.

In a similar fashion to Animation, Timeline is going to prompt for a saved location on your local hard disk, so create a folder according to your needs. Once completed, there will be a newly generated “Playable Director” component added to your game object. This Playable Director is basically a controller which dictates when the timeline plays. In this scenario, since we will be triggering the animation via script, having the “Play on Awake” check on is appropriate.

In the timeline window, its time to import the virtual cameras from the scene. But before we can do any of that since we are using cinemachine as our virtual cameras, we need to import the Cinemachine brain into the timeline. The Cinemachine Brain is what controls all of the Cinemahcine cameras. The component is usually placed within the Main Camera. To add the Cinemachine brain into the timeline, simply drag and drop the Main Camera game object from the hierarchy into the timeline. Another method of adding the Cinemachine, is go on the timeline, click the Plus icon > Cinemachine track. This would add a channel which is asking for a cinemachine brain, which you need to drag and drop the main camera into.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Simon Truong

Simon Truong

A Designer, an Illustrator and a massive tech geek aspiring to become a professional Unity Developer.