Nerd For Tech
Published in

Nerd For Tech

Unity Guide

Handle animations with Timeline | Unity

A very quick guide about how to handle animations using the timeline in Unity

Objective: Handle the animations of a cutscene using the Timeline in Unity.

In the last post I covered how to use a dolly track in Unity to build a cutscene. Now, it’s time to find out how to handle the animations of a cutscene inside the Timeline with Unity.

New Cutscene

We have the next previs element to take it as a reference to compose the cutscene:

This cutscene is expected to be shown when the player completes the level and it basically displays a thief (the player) grabbing a door knob to open the main vault of a building with jewelry. Let’s move the camera and put the respective model to define the shot of our cutscene:

Timeline Window

Once we have the model in the desired position, let’s open the Timeline window by clicking on Window > Sequencing > Timeline:

If we select the model of the cutscene in the Hierarchy we’ll see that there’s an Animator component attached already. This Animator component uses an animation controller to handle the animation clips that the model displays.

Now, in order to be able to use the Timeline for our cutscene, let’s select the empty gameobject that is parent of the model. Once selected, let’s click in the button at the Timeline window to create a new timeline playable asset for the cutscene:

Handling the animations

The Timeline will allow us to control the animations of our model and synchronize them with different aspects that compose the cutscene like the audio and the cameras. In order to handle the animations of our model, let’s drag the gameobject that contains the Animator component into the Timeline and choose to add a new Animation track. Once we add it, let’s right-click in the timeline and choose Add From Animation Clip to select the animation clip that we want to handle:

I added the animation clip that the Animator controller had into the Timeline

And now, by having the animation track in our Timeline, we’re able to handle the animation and synchronize it with another essential elements for our cutscene like audio and cameras. We are able to display the animation without having to play the scene, we can just drag the white arrow in the Timeline to see the state in every frame or second:

And that’s it, we can handle animations for our cutscene in Unity! :D. I’ll see you in the next post, where I’ll be showing how to synchronize the audio and the visuals to build a cutscene in Unity.

If you want to know more about me, feel free to connect with me on LinkedIn or visit my website :D

--

--

--

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Recommended from Medium

Learning HashiCorp Vault and Exam Prep

Safe Call + Elvis = Chain

Committed: How I launched my startup by coding 150 days in a row

RAGE FAN INTRODUCES AFFILIATE PROGRAM & ADS REVENUE DISTRIBUTION

Generating fresh AWS S3 URLs when accessing uploaded files in Django

Tongue-in-Cheek User Story: Galley Slave Operations

Hello! I am Harshita Patel.

Sinatra Social Calendar

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
Fernando Alcantara Santana

Fernando Alcantara Santana

A passionate computer technology engineer and Unity developer that is always looking to grow in every aspect of life :).

More from Medium

How to Build an Interactive Security Camera System in Unity

Setting up a Unity Project for the High Definition Render Pipeline (HDRP)

Enabling Unity Ads

Introducing Stream’s New SDK for the Unity Gaming Engine