ITransition Interface

Summary

An object that can create an Animancer.AnimancerState and manage the details of how it should be played.

Transitions are generally used as arguments for Animancer.AnimancerPlayable.Play(Animancer.ITransition).
graph BT Type-.->Interface0["IHasKey"] click Interface0 "/animancer/api/Animancer/IHasKey" Type["ITransition"] class Type type-node Implementing0["PlayableAssetState.Transition"]-.->Type click Implementing0 "/animancer/api/Animancer/Transition" Implementing1["MixerTransition2D"]-.->Type click Implementing1 "/animancer/api/Animancer/MixerTransition2D" Implementing2["AnimancerTransition<T>"]-.->Type click Implementing2 "/animancer/api/Animancer/AnimancerTransition_1" Implementing3["PlayableAssetTransition"]-.->Type click Implementing3 "/animancer/api/Animancer/PlayableAssetTransition" Implementing4["Float3ControllerTransition"]-.->Type click Implementing4 "/animancer/api/Animancer/Float3ControllerTransition" Implementing5["LinearMixerState.Transition"]-.->Type click Implementing5 "/animancer/api/Animancer/Transition" Implementing6["Float2ControllerTransition"]-.->Type click Implementing6 "/animancer/api/Animancer/Float2ControllerTransition" Implementing7["ManualMixerState.Transition"]-.->Type click Implementing7 "/animancer/api/Animancer/Transition" Implementing8["ControllerTransition"]-.->Type click Implementing8 "/animancer/api/Animancer/ControllerTransition" Implementing9["Float3ControllerState.Transition"]-.->Type click Implementing9 "/animancer/api/Animancer/Transition" Implementing10["Float1ControllerState.Transition"]-.->Type click Implementing10 "/animancer/api/Animancer/Transition" Implementing11["LinearMixerTransition"]-.->Type click Implementing11 "/animancer/api/Animancer/LinearMixerTransition" Implementing12["ControllerState.Transition"]-.->Type click Implementing12 "/animancer/api/Animancer/Transition" Implementing13["ClipState.Transition"]-.->Type click Implementing13 "/animancer/api/Animancer/Transition" Implementing14["AnimancerTransition"]-.->Type click Implementing14 "/animancer/api/Animancer/AnimancerTransition" Implementing15["ManualMixerTransition"]-.->Type click Implementing15 "/animancer/api/Animancer/ManualMixerTransition" Implementing16["Float2ControllerState.Transition"]-.->Type click Implementing16 "/animancer/api/Animancer/Transition" Implementing17["RootMotion.MotionTransition"]-.->Type click Implementing17 "/animancer/api/Animancer.Examples.Locomotion/MotionTransition" Implementing18["ITransitionDetailed"]-.->Type click Implementing18 "/animancer/api/Animancer/ITransitionDetailed" Implementing19["ManualMixerState.Transition<TMixer>"]-.->Type click Implementing19 "/animancer/api/Animancer/Transition_1" Implementing20["MixerState.Transition2D"]-.->Type click Implementing20 "/animancer/api/Animancer/Transition2D" Implementing21["AnimancerState.Transition<TState>"]-.->Type click Implementing21 "/animancer/api/Animancer/Transition_1" Implementing22["ClipTransition"]-.->Type click Implementing22 "/animancer/api/Animancer/ClipTransition" Implementing23["Float1ControllerTransition"]-.->Type click Implementing23 "/animancer/api/Animancer/Float1ControllerTransition" Implementing24["ControllerState.Transition<TState>"]-.->Type click Implementing24 "/animancer/api/Animancer/Transition_1" Implementing25["MixerState.Transition<TMixer, TParameter>"]-.->Type click Implementing25 "/animancer/api/Animancer/Transition_2"

Syntax

public interface ITransition : IHasKey

Properties

Name Value Summary
FadeDuration float
The amount of time the transition should take (in seconds).
FadeMode FadeMode
When a transition is passed into Animancer.AnimancerPlayable.Play(Animancer.ITransition), this property determines which Animancer.FadeMode will be used.

Methods

Name Value Summary
Apply(AnimancerState) void
Called by Animancer.AnimancerPlayable.Play(Animancer.ITransition) to apply any modifications to the `state`.
CreateState() AnimancerState
Creates and returns a new Animancer.AnimancerState.

Note that using methods like Animancer.AnimancerPlayable.Play(Animancer.ITransition) will also call Animancer.ITransition.Apply(Animancer.AnimancerState), so if you call this method manually you may want to call that method as well. Or you can just use Animancer.AnimancerUtilities.CreateStateAndApply(Animancer.ITransition,Animancer.AnimancerPlayable).

Extension Methods

Name Value Summary
CreateStateAndApply(AnimancerPlayable) AnimancerState
Calls Animancer.ITransition.CreateState and Animancer.ITransition.Apply(Animancer.AnimancerState).