Timeline Mixer โณ

January 19, 2021 ยท View on GitHub

Timeline Mixer allows for blending between currently playing (or paused) timeline animation and other animations per animator.

Quick Start ๐Ÿ‡๐Ÿผ

  1. Add a TimelineGraph Modification Manager component to your scene for every timeline you want to inject into and drag the Timeline Director you want to modify in the Director field.

  1. Add a Simple Animation Clip Mixer component to your scene and reference the Animator component you want to blend animation with.

  1. Add a reference to the Simple Animation Clip Mixer to your TimelineGraph Modification Manager list of mixers.

Advanced ๐Ÿ’ก

You can create your own mixer behaviours by implementing a Timeline AnimationMixer and overriding the OnConnected and OnUpdate methods.

  • OnConnected is called once when the new mixer is injected into the timeline's playable graph. Use it to add inputs to the injected AnimationLayerMixerPlayable node by calling the extension method mixer.AddClip and store the output index for blending.

  • OnUpdate is called every frame with a reference to the injected mixer node and manager. Use it to update the weights on

Playing animation while Timeline is paused โ‰๏ธ

To play animation while the PlayableDirector is paused you can call the RequireTimelineEvaluate() method on TimelineGraph Modification Manager from the OnUpdate method of your Timeline AnimationMixer. This will trigger a call to Evaluate on the PlayableDirector at the end of the update.

How does it work? ๐Ÿค”

Behind the scenes Timeline Mixer injects into the Playable Graph generated by Unity's Timeline. You can visualize that graph by installing the Playable Graph Visualizer package.

Contact โœ’๏ธ

needle โ€” tools for unity โ€ข @NeedleTools โ€ข @marcel_wiessler โ€ข @hybridherbst