Transition Types

Each of the State types that are included in Animancer has its own Transition type which contains various details relevant to it so that when passed into AnimancerComponent.Play(ITransition) it will create that type of state. For example, a ClipTransition will create a ClipState to play a single AnimationClip.

Serialized References

Unity's serialization system doesn't normally support inheritance, however the [SerializeReference] attribute allows it to do so. Placing that attribute on a transition field allows you to choose which type of transition you actually want to use with a dropdown menu in the Inspector without your code needing to know the specific type.

ClipTransition ITransition
[SerializeReference]
private ClipTransition _Animation;
[SerializeReference]
private ITransition _Animation;
This allows you to select ClipTransition or anything that inherits from it such as a ClipTransitionSequence. This allows you to select any transition type and is used by Transition Assets.

The Polymorphic Drawer system also allows you to use this feature on other unrelated types.

Clip Transitions

Type Details
ClipTransition

Creates a ClipState when played. The details of each field are explained on the Transitions page.

ClipTransitionSequence

Inherits from ClipTransition and adds an array of other ClipTransitions which will be played in order after the first (using each of their End Events to play the next one).

Mixer Transitions

These transitions create various types of Mixer States. You can Right Click on any of the transition fields to open a context menu with several useful functions.

Type Details
ManualMixerTransition

Creates a ManualMixerState when played.

LinearMixerTransition

Creates a LinearMixerState when played.

MixerTransition2D

Creates either a CartesianMixerState or DirectionalMixerState when played depending on the selected Type.

Other Transitions

Type Details
ControllerTransition

Creates a ControllerState when played.

PlayableAssetTransition

Creates a PlayableAssetState when played. Has similar fields to a ClipTransition with the addition of a Bindings array explained on the Timeline page.

Custom Transitions

You can create your own transitions by implementing ITransition from scratch or inheriting from Transition or any of its derived types. When doing so, you may also want to alter the way it is drawn in the Inspector by creating another class that inherits from the Drawer class inside the Transition you are inheriting from or implementing your own PropertyDrawer.

The Facial Expressions sample implements a class that inherits from ClipTransition to add a Name field to give each transition a user-friendly display name.