Search Unity

Question Animation blend in/out between PlayableDirector and Gameplay

Discussion in 'Timeline' started by Sangemdoko, Jul 3, 2022.

  1. Sangemdoko

    Sangemdoko

    Joined:
    Dec 15, 2013
    Posts:
    222
    Hi

    I am trying to blend Timeline animations in a PlayableDirector with the ones from the normal Gameplay animator. And also in between timelines

    The best posts I've found on the subject is:
    https://forum.unity.com/threads/fade-out-a-playabledirector-so-an-animator-can-take-over.513800/
    and I also found someone who made it work and shared his solution on git:
    https://github.com/jeffvella/UnityTimelordBlender

    But for some reason I can't get it to work properly in my project.

    So I wanted some clarifications on certain things

    1) Are "AnimationPlayableOutput" per Animation Track, does that include the animation override tracks? Having multiple characters animated means multiple "AnimationPlayableOutput" correct?

    2) Whats the best way to set the weight of the "AnimationPlayableOutput" without affecting the original timeline asset? My current approach has been to create a new mixer and output at runtime and add it to the playablegraph? Can I make a runtime copy of the timeline instead?

    3) Is there any way to set the weight on the entire timeline being played by the playable to make things simpler?

    4) The part I'm not sure about is blending between two PlayableDirectors. If I were to set 0.5f weight each, wouldn't that blend gameplay (0.25), director 1 (0.25) and director 2 (0.5).... so that means I need to keep the weight of director1 to 1 and director2 to 0.5f.
    Of course that's assuming director 2 has priority over director 1, which I don't know how to specify.

    Thank you for your time.