The Power of Activation Tracks
Objective: To learn what an Activation Track is in Unity and how it could help improve your animation cutscenes.
Activation Tracks turn game objects on and off in the Hierarchy, using the Timeline.
Let’s use our existing spaceship scene to show what I mean by this. Currently there is an animation track that simply plays 3 animation clips in sequential order, which move and rotate the StarDestroyer game object around.
Adding a Primitive Sphere to the Scene
First let’s add a primitive sphere to the scene which can act as a tiny planet, near the StarDestroyer game object. This sphere is going to be the game object that the activation track is going to turn on and off.
Adding an Animation Track
Right click in the Timeline → Activation Track. Alternatively, you can drag the primitive sphere from the Hierarchy into the Timeline window and select ‘Activation Track’ from the options.
Let’s Play the Scene Again and See What Happens
As you can see the sphere stays activated until the activation track clip ends and then in the Hierarchy the game object is switched off.
You can also have many clips to make the sphere constantly flicker:
Using activation tracks tells Timeline when it should activate/deactivate a certain game object in a linear fashion. The game object can also have an animation attached to it that plays when it is activated.
Taking our current scene as an example, if I was to create a new thruster boost animation that was attached to a game object, I could tell Timeline (through an activation track), when to turn this animation clip on as the StarDestroyer is speeding away and have it deactivate when the ship stops.
Alternatively, I could have an asteroid hit the StarDestroyer. Then, at that moment, tell Timeline to activate a game object which has an explosion animation on it.
This makes activation tracks a very useful tool when building out an animation sequence as it is able to bring multiple animations together at a set time, giving you amazing control to build the perfect cutscene.
Activation Track Properties