Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

When should I use Timeline vs. standalone animations/controllers?

Discussion in 'Timeline' started by reinfeldx, Apr 24, 2020.

  1. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    I've got some UI elements I'd like to trigger to appear on-screen periodically. (They're style rankings for in-game combat similar to Devil May Cry and other action titles.)

    I've used the standard animation/controller system for a long time, but I'm not sure if Timeline is a better choice for smaller in-game animation sequences and small UI animations.

    For a quick enemy death animation, would it be good to animate it via Timeline? What about pop-in UI elements like I described?

    I understand Timeline is likely the better choice for things like cutscenes, but beyond that I'm not sure.
     
    tonytopper likes this.
  2. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Timeline is a decent choice for both these scenarios. Whether it is better than an animator controller really depends on your workflows and goals.

    Advantages of using Timeline over animator controller.
    • The animation can be applied to the object and unloaded after completing. i.e. One-off animations don't need to be loaded with the character/object, so in-game moments can be made to be truly standalone.
    • You can synchronize multiple items together, including camera, audio, effects and even signals. The animator controller requires AnimationEvents embedded in the animation, where as timeline will let you author these independent of the animation clip.
    In general, animator controllers are made to author the state of a single object, where as Timeline is made to synchronize and sequence multiple objects together.

    And it may not be a choice of one or the other. An object can have an animator running, then have a timeline temporarily override it, then return to the animator. So, timeline can be used to augment your existing workflow, instead of replace it.
     
  4. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    220
    This is a nice framing to have. Is there any place where this is expanded upon well?

    Are there any plans for integrating the two more?
     
    CSEliot likes this.