Simple Timeline Animations in Unity

Thomas Mauro
4 min readOct 28, 2022

--

Just like I said my next article would be about Timeline animations in Unity. This one will be a brief overview and nowhere near as long as the last article. But nonetheless, Timeline is very powerful to use in combination with Cinemachine or even by itself. Let's see about the basics of how this works.

Goal:

  • Create a cube and have it animate using Timeline
  • Create 3 separate timeline animations
  • Swap the timeline animations around sequentially
  • Hierarchy/Create Empty GameObject
  • Renamed the Empty Object to Director (The director holds or is the Timeline)
  • Make sure you have the Timeline Window up (Window/Sequencing/Timeline)
  • Select the Director Object/Create on the Timeline module
  • Create a new folder before saving and call it Directors
  • Name the Director/Timeline what you want or need it to be. Calling mine AnimTimeline
The errors had something to do with the plane I have in the scene so I changed it out.

Here is what the timeline will look like.

  • Now I create a cube and set it as a child of the Director. I will be animating this cube.
  • Set the cube into the Timeline as an Animation Track

Now we have things in place to show how to make a basic animation.

  • Press the Rec Button on the Cube Timeline Animation Track
  • Select the cube in the Hierarchy, and right-click on Transform/Position/Add Key (This is being done while Rec is on) You can also update the key the same way if a key has already been set to a frame. I have had to do this often while learning.
This will be starting position for the cube.
  • Decide how long you want the first move to be then move the cube a direction a little way.
  • Move ahead on Timeline again then move the cube to another spot.

Now let's convert this animation into its own track that can be altered as needed on the Timeline.

  • Stop Rec
  • Right-click on the animation on the Timeline, and select Convert to Clip Track.

Now let's make another animation track using the same cube on the same Timeline. This will automatically be created as an animation track now.

  • Press Rec again and select the cube
  • Make sure to have the time set past your first animation track
  • Click the cube and Add Key (This will create another animation track on the same line as the first animation)
Made sure to put them together like this.
  • Now to make the cube go up
  • In the Middle of the new animation track, have the rec on and lift the cube up a little. Now on this track, the cube will go up and then back down.
  • Now create another one, in the same way, to make another animation track for the cube. So now a third animation track.
  • Also, add a key at the end and make sure the tracks are snapped to each other.
  • I made this one move a bit to the left
  • So again have your time set in the middle of the track, move the cube, add key, stop recording, and test the full animation.

This should reset back to the cube's original position after the animation. Put it to loop and it will loop the animation. You can also play with the tracks a little to test out what can be done.

--

--