Simple Timeline Animations

Dennisse Pagán Dávila
5 min readFeb 1, 2023

--

If you’ve ever used a video editor, you might feel right at home with Timeline since they essentially accomplish extremely similar functions with similar interfaces.

Timeline is a built-in feature in Unity that allows you to edit sound, animations, control objects, particles…etc. Timeline enables you to create a sequence with all the necessary elements in a place where they will play out in a linear fashion; you can think of it as an advanced version of the animation window. Things like chest opening sequences, victory sequences and such can be achieved through this.

Article Excerpt from What are Timeline and Cinemachine?

Objective: Learn how to create a simple animation in Timeline.

Table of Contents

· The Playable Director and Animation
· Tweaking the Animation Track
The Speed Multiplier:
· Ease in/out
· The Result:

The Playable Director and Animation

Timeline uses a component known as the Playable Director in order to connect the Timeline Instance and the Timeline Asset.

Let’s take a look at how this is used step-by-step:

  1. A Best Practice Tip for the Playable Director is to start by creating an Empty Game Object, rename it as “Director”, and make said object into a Parent of the object you wish to animate.

Why? Because this makes it easier to track which objects in your scene are being managed by a Timeline Director.

Here my Child object, the Cube, will be animated.

2. Make sure your Director empty object is selected, then go to your Timeline and Create a DirectorTimeline. You’ll want to create a Director Folder in your Assets to store this. I already had mine in the example below.

3. Drag and drop your Child object into the Timeline. You will always be prompted to select what kind of track you want to create before committing to this addition, make sure you select Animation Track.

4. Now we can start recording. Once you press the Record button, the Timeline should turn red. I will be making a simple animation by moving my Cube’s position, so I go to the position in the Inspector and select Add Key via right mouse click. Add Key will add the current position of our object to your recording.

5. You can drag Playhead and move your object to keep adding keys.

6. When you are finished recording, convert your click to a track via right mouse click on the recorded section.

Converting your keys into a clip make it so you have your entire animation stored in one place which can be edited in a variety of different ways. Another benefit is that this helps clean up your Timeline when working with multiple tracks, and allows you to easily manage multiple unique animations.

By following the process above, you can create multiple animation tracks for the same object.

Tweaking the Animation Track

If you click on an animation track, you will a variety of adjustable parameters.

For now, I will focus on two of them: The Speed Multiplier and the Ease in/out.

The Speed Multiplier:

If you want to change the speed of your animation, instead of going to the Animation Window and tweaking each individual key, you can simply adjust the multiplier.

Regular Animation:

Speed Multiplier Adjusted:

Ease in/out

When you change the speed, the proximity between animation clips will change on your timeline, which will affect when the subsequent animations play.

If you drag it close, even as far as overlapping them, this will make the animation track ease into the second one.

If you look at the image below, you wouldn’t even be able to tell that there are two different clips spliced together because of how well they ease into each other.

You can also edit the Ease rate by holding down the Ctrl button as you drag the clip.

The Result:

This is what my simple animation looks likes after splicing three animations together.

I hope you have found this information valuable! Follow me for more Unity Development articles! :) I am a passionate Unity Developer and Writer on a journey to join the video game industry. Check out my LinkedIn and Twitter!

--

--

Dennisse Pagán Dávila

Software Engineer that specialize in Game Development. Currently looking for new opportunities. Portfolio: dennissepagan.com