Search Unity

AnimationPlayableOutput animation with more play methods?

Discussion in 'Timeline' started by RakNet, Jan 15, 2018.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    Following the example from https://docs.unity3d.com/Manual/Playables-Examples.html

    The old animation system has Play, PlayQueued, Blend, CrossFade, and CrossFadeQueued. But I don't see any of those operations in AnimationClipPlayable or in AnimationPlayableOutput. There is just play. How would I play using the full range of methods?
     
  2. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    789
    The old animation took away more control from you by offering those methods.

    The new playables system is time-line oriented. You have to do the blending yourself by blending multiple playables together.

    The document you linked already has an example of how to do blend-trees yourself.
    I'm pretty sure that you'll have to do this yourself.
    One way that I can think of right now would be to simply reserve one track for "temporary clips" and when needed the the right animation clip, and then blend to that.
    Not sure if there is a better way though.

    I'd like some input on this as well actually.
    Would we even have to recreate the 2D Freeform blend tree? (Mathematically, that could get pretty complicated fast)
    Or is there a better way that I just don't see?

    Or is it that maybe playables are simply just not intended to fully replace the animator component anyway? But then what's the best way to leverage them both?