Timeline in Unity

In this article we will use the Timeline of Unity to continue working on our cutscene.

What is the Timeline in Unity

The Timeline in Unity is way to visually edit a sequence of events along the time axis. Events can be music, play animation, particles, enable or disable objects, move objects around etc etc.

Create a new Timeline

Select the cutscene gameobject that contains our virtual camera’s and actors.
Window > Timeline (panel) > click Create (button)
It is recommended to create a separate folder to save our timelines in. When it is created it should look something like the image below.

On our Cutscene gameobject we remove the Animator component. We only need the Playable Director component here, since we aren’t animating our Cutscene gameobject itself. So also remove it from the timeline.

Playable director decides when our cutscene gameobject is enabled and plays. We can do this through code and let it play the timeline asset.

To use the cinemachine virtual camera’s in our timeline we need to add the main camera.
Timeline (panel) > Add > Cinemachine.Timeline > Cinemachine Track > Select Main Camera for the Cinemachine Brain

Timeline Settings to Seconds

Timeline (panel) > Gear icon (top right) > Seconds

Use Virtual Camera’s from Timeline

Now we are ready to use our virtual camera’s from our timeline.
R-Click in Timeline > Add Cimemachine Shot Clip

Inspector > Virtual Camera > Drag in our Virtual Camera

Repeat these two steps for our second virtual camera.

Adjust Duration of a Clip by simply dragging

Preview Timeline

With the Play button we can get a preview of our Timeline.

Bonus: Blend shots

Currently it’s a hard cut from shot to shot. It’s also possible to blend.
Drag one shot into the other. You can adjust the duration with it too.

Let’s preview the blend.

--

--

--

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Having a good proportion of Developer Test

A Goldilocks Approach to Reliability and Scalability Projects

Boosting up your Rancher and build infrastructure as code with cattlectl

Python tricks and treats

How to change mounted drive partition owner

Creating A UI Flash Effect In Unity

How to Make Your MacOS Terminal Look as Awesome as Mine in 2021

How do I differentiate print and return to function of python programming

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
Tristan Engel

Tristan Engel

Aspiring developer that’s self-learning Unity & C# to transition to a career with Unity. I got a passion for creating interactive experiences.

More from Medium

OnCollisionEnter Vs. OnTriggerEnter — When to use them?

Installing and creating a new Unity project

Blood Splatters in Unity

Enemies Straight Ahead!