Timeline Mixer Documentation
Loading...
Searching...
No Matches
Animancer

Animancer version 8.1 and up

Timeline Mixer integrates with Animancer, the minimum version of Animancer that is currently supported is 8.1

To get started using Animancer and Timeline Mixer together, the support UnityPackage will need to be installed. Navigate to Assets -> TimelineMixer -> Scripts -> Integrations

Install the Animancer support package after installing Animancer itself, this support package also includes an example scene.

Add an AnimancerComponent to your character / GameObject.

Next, in your scripts include the namespace:

cs
using TimelineMixer.Integrations.AnimancerUtilities;

Now we can initialize an animancer component, and place its Playables on TimelineMixers PlayableGraph.

We just need to be certain that one of the Timelines Animation Tracks is targeting the same Animator that has the AnimancerComponent, and then we can link it to TimelineMixer with:

cs
bool muteOtherConnections = true;
float weight = 1f;
TimelineMixerAnimancerUtilities.InitializeAnimancer(timelineMixerComponent, animancerComponent, weight, muteOtherConnections);

If the Animancer Component has already been used or initialized, this will destroy its current graph and reinitialize it.

Animancers Playables are connected to the same AnimationMixerPlayable that AnimatorControllers are sent to.

Set weight to 1f to give Animancer full influence, and muteOtherConnections to true to set other connections on the Animation Mixer to 0f.

If you need to access this mixer to change weights manually, you can do so with:

cs
PlayableNode externalSystemNode = timelineMixerComponent.GetExternalConnectionAnimationNode(animator);

This returns the PlayableNode wrapper for the mixer.

cs
// Get a list of connected inputs
List<int> inputConnections = externalSystemNode.GetListConnectedInputs();
// Set weights as desired, this mixers input weights are not automatically managed by Timeline Mixer.
externalSystemNode.SetInputWeight(inputConnections[0], 0f);

To play animation clips, use the AnimancerComponents playback methods like normal after initializing with Timeline Mixer.