AnimancerTransition<TState> Class

Summary

A serializable Animancer.ITransition which can create a particular type of Animancer.AnimancerState when passed into Animancer.AnimancerPlayable.Play(Animancer.ITransition).
graph BT Type-->Base0["Object"] Type-.->Interface0["ITransition<TState>"] Type-.->Interface1["ITransitionDetailed"] click Interface1 "/animancer/api/Animancer/ITransitionDetailed" Type-.->Interface2["ITransitionWithEvents"] click Interface2 "/animancer/api/Animancer/ITransitionWithEvents" Type-.->Interface3["ITransition"] click Interface3 "/animancer/api/Animancer/ITransition" Type-.->Interface4["IHasKey"] click Interface4 "/animancer/api/Animancer/IHasKey" Type-.->Interface5["IPolymorphic"] click Interface5 "/animancer/api/Animancer/IPolymorphic" Type-.->Interface6["IHasEvents"] click Interface6 "/animancer/api/Animancer/IHasEvents" Type-.->Interface7["ICopyable<AnimancerTransition<TState>>"] Type["AnimancerTransition<TState>"] class Type type-node Derived0["PlayableAssetTransition"]-->Type click Derived0 "/animancer/api/Animancer/PlayableAssetTransition" Derived1["ControllerTransition<TState>"]-->Type click Derived1 "/animancer/api/Animancer/ControllerTransition_1" Derived2["ManualMixerTransition<TMixer>"]-->Type click Derived2 "/animancer/api/Animancer/ManualMixerTransition_1" Derived3["ClipTransition"]-->Type click Derived3 "/animancer/api/Animancer/ClipTransition"

Syntax

[Serializable]
public abstract class AnimancerTransition<TState> : ITransition<TState>, ITransitionDetailed, 
    ITransitionWithEvents, ITransition, IHasKey, IPolymorphic, IHasEvents, 
    ICopyable<AnimancerTransition<TState>>
    where TState : AnimancerState

Remarks

Documentation: Transitions

Attributes

Type Description
SerializableAttribute

Type Parameters

Name Description
TState

Properties

Name Value Summary
BaseState AnimancerState
The state that was created by this object. Specifically, this is the state that was most recently passed into Animancer.AnimancerTransition`1.Apply(Animancer.AnimancerState) (usually by Animancer.AnimancerPlayable.Play(Animancer.ITransition)).

You can use Animancer.AnimancerPlayable.StateDictionary.GetOrCreate(Animancer.ITransition) or Animancer.AnimancerLayer.GetOrCreateState(Animancer.ITransition) to get or create the state for a specific object.

Animancer.AnimancerTransition`1.State is simply a shorthand for casting this to TState.
Events AnimancerEvent.Sequence
Events which will be triggered as the animation plays.
FadeDuration float
The amount of time this transition should take (in seconds).
FadeMode FadeMode
The Animancer.FadeMode which should be used when this transition is passed into Animancer.AnimancerPlayable.Play(Animancer.ITransition).
IsLooping bool
What will the value of Animancer.AnimancerState.IsLooping be for the created state?
IsValid bool
Can this transition create a valid Animancer.AnimancerState?
Key Object
The Animancer.AnimancerState.Key which the created state will be registered with.
MainObject Object
The Animancer.AnimancerState.MainObject that the created state will have.
MaximumDuration float
The maximum amount of time the animation is expected to take (in seconds).
Name string
The display name of this transition.
NormalizedStartTime float
The Animancer.AnimancerState.NormalizedTime to start the animation at.
SerializedEvents AnimancerEvent.Sequence.Serializable
Events which will be triggered as the animation plays.
Speed float
The Animancer.AnimancerNode.Speed to play the animation at.
State TState
The state that was created by this object. Specifically, this is the state that was most recently passed into Animancer.AnimancerTransition`1.Apply(Animancer.AnimancerState) (usually by Animancer.AnimancerPlayable.Play(Animancer.ITransition)).

Methods

Name Value Summary
Apply(AnimancerState) void
Called by Animancer.AnimancerPlayable.Play(Animancer.ITransition) to apply any modifications to the `state`.
ApplyDetails(AnimancerState, float, float) void
Applies the given details to the `state`.
static
CopyFrom(AnimancerTransition<TState>) void
Copies the contents of `copyFrom` into this object, replacing its previous contents.
CreateState() TState
Creates and returns a new TState.
ToString() string
Returns the Animancer.AnimancerTransition`1.Name and type of this transition.