askvity

What is the Animation Priority in Unity?

Published in Unity Animation 3 mins read

In Unity, specifically within the Timeline window, the animation priority dictates which animation track takes precedence when multiple tracks attempt to control the same properties on an object. The priority order is determined by the vertical arrangement of the tracks.

Understanding Animation Priority in Unity Timeline

Based on the provided reference, the animation priority in the Unity Timeline window is straightforward:

  • Order Matters: Tracks are evaluated from top to bottom.
  • Last Track Wins: The last track (the one furthest down in the list) has the highest priority.
  • Overriding Behavior: Properties animated by a lower track will override the same properties animated by a track higher up in the list.

The reference explicitly states: "In the Timeline window, the animation priority is from the first track to the last track, where the last track has priority. When you reorder tracks, it is important to understand the animation priority."

Why Priority is Important

Understanding this priority is crucial for controlling complex animations in Timeline. If you have multiple animation tracks targeting the same object's position, rotation, color, or any other property, the track with the highest priority (the bottom-most one) will determine the final value of that property at any given time.

Practical Implications & Examples

  • Overlays and Corrections: You might place a main animation track higher up and a corrective animation (like a slight hand adjustment or blinking) lower down. The corrective track will override the main track only for the specific properties it animates.
  • Facial Animation: A track for the main body animation might be high up, while tracks for facial expressions could be lower. The facial tracks would override the main track's influence on face bones or blend shapes.
  • Track Reordering: Changing the vertical order of tracks directly changes their priority. Moving a track lower gives it higher priority, potentially changing the resulting animation if it animates properties already covered by other tracks.

Here’s a simple illustration:

Track Position Priority Level Effect
Top Track Lowest Can be overridden by any track below it
... ... ...
Bottom Track Highest Overrides properties from tracks above

When working with Timeline, always consider the vertical order of your tracks to ensure the desired animation blending and overriding behavior is achieved.

Related Articles