Animancer v8.0 is coming

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.

There are several major categories of transitions:

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 or a MotionTransition from the Root Motion example. This allows you to select any transition type which is usually a bad idea because code that expects to control a Mixer State won't work with a Controller State or a simple ClipState.

Every type of State also has its own nested ITransition interface for transitions that specifically create that type of state (e.g. ClipState.ITransition). This includes the UnShared type for that state so your code doesn't even need to know whether it is using a regular transition or a Transition Asset.

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

Basic Transitions

Type Details
AnimancerTransition<TState> abstract base class for all other transitions. Only has a FadeDuration field.
ClipTransition

Inherits from AnimancerTransition<ClipState> and will create a ClipState. The details of each field are explained on the Transitions page.

ClipTransitionSequence

Inherits from ClipTransition and simply 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).

PlayableAssetTransition

Inherits from AnimancerTransition<PlayableAssetState> and will create a PlayableAssetState. Has similar fields to a ClipTransition with the addition of a Bindings array explained on the Timeline page.

Mixer Transitions

These transitions create various types of Mixer States. They all use reorderable lists to configure their states. You can Right Click on any of the transition fields to open a context menu with several useful functions.

Type Details
ManualMixerTransition<TMixer> abstract base class for transitions that create states derived from ManualMixerState.
ManualMixerTransition

Inherits from ManualMixerTransition<ManualMixerState> and will create a base ManualMixerState.

MixerTransition<TMixer, TParameter> abstract base class for transitions that create states derived from MixerState. Has a Thresholds array and DefaultParameter field.
LinearMixerTransition

Inherits from MixerTransition<LinearMixerState,float> and will create a LinearMixerState.

MixerTransition2D

Inherits from MixerTransition<MixerState<Vector2>,Vector2> and will create either a CartesianMixerState or DirectionalMixerState depending on the selected Type.

Controller Transitions

These transitions create various types of Controller States.

Type Details
ControllerTransition<TState> abstract base class for transitions that create states derived from ControllerState.
ControllerTransition

Inherits from ControllerTransition<ControllerState> and will create a base ControllerState.

Float1ControllerTransition

Float2ControllerTransition

Float3ControllerTransition

Inherits from ControllerTransition<Float1ControllerState> and adds a ParameterName field and will create a Float1ControllerState which wraps that particular parameter. Once an Animator Controller is assigned, the Parameter Name field allows you to select the name of any Float parameter.

Custom Transitions

You can create your own transitions by implementing ITransition from scratch or inheriting from AnimancerTransition 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 Root Motion example implements a class that inherits from ClipTransition to add an ApplyRootMotion field to determine whether the Animator.applyRootMotion should be enabled for each animation.