Animancer v6.0 is currently available for testing.

PlayableAssetState.

PlayableAssetState.Transition Class

Summary

A serializable Animancer.ITransition which can create a Animancer.PlayableAssetState when passed into Animancer.AnimancerPlayable.Play(Animancer.ITransition).
graph BT Type-->Base0["AnimancerState.Transition<PlayableAssetState>"] Base0-->Base1["Object"] Type-.->Interface0["ITransitionDetailed"] click Interface0 "/animancer/api/Animancer/ITransitionDetailed" Type-.->Interface1["ITransition"] click Interface1 "/animancer/api/Animancer/ITransition" Type-.->Interface2["IHasKey"] click Interface2 "/animancer/api/Animancer/IHasKey" Type-.->Interface3["IAnimationClipCollection"] click Interface3 "/animancer/api/Animancer/IAnimationClipCollection" Type["PlayableAssetState.Transition"] class Type type-node

Syntax

[Serializable]
public class PlayableAssetState.Transition : AnimancerState.Transition<PlayableAssetState>, 
    ITransitionDetailed, ITransition, IHasKey, IAnimationClipCollection

Remarks

Unfortunately the tool used to generate this documentation does not currently support nested types with identical names, so only one Transition class will actually have a documentation page.

Documentation: Transitions

Attributes

Type Description
SerializableAttribute

Properties

Name Value Summary
Asset PlayableAsset
[UnityEngine.SerializeField] The asset to play.
Bindings Object[]
[UnityEngine.SerializeField] The objects controlled by each of the tracks in the Timeline Asset.
FadeMode FadeMode
If this transition will set the Animancer.AnimancerState.NormalizedTime, then it needs to use Animancer.FadeMode.FromStart.
IsValid bool
Indicates whether this transition can create a valid Animancer.AnimancerState.
Key Object
The Animancer.PlayableAssetState.Transition.Asset will be used as the Animancer.AnimancerState.Key for the created state to be registered with.
MainObject Object
The Animancer.AnimancerState.MainObject that the created state will have.
MaximumDuration float
[Animancer.ITransitionDetailed] The maximum amount of time the animation is expected to take (in seconds).
NormalizedStartTime float
[UnityEngine.SerializeField] Determines what Animancer.AnimancerState.NormalizedTime to start the animation at.

The default value is System.Single.NaN which indicates that this value is not used so the animation will continue from its current time.
Speed float
[UnityEngine.SerializeField] Determines how fast the animation plays (1x = normal speed, 2x = double speed).

Methods

Name Value Summary
Apply(AnimancerState) void
Called by Animancer.AnimancerPlayable.Play(Animancer.ITransition) to apply the Animancer.PlayableAssetState.Transition.Speed and Animancer.PlayableAssetState.Transition.NormalizedStartTime.
CreateState() PlayableAssetState
Creates and returns a new Animancer.PlayableAssetState.

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).

This method also assigns it as the Animancer.AnimancerState.Transition`1.State.