AnimancerTransitionAsset<TTransition> Class

Summary

A UnityEngine.ScriptableObject based Animancer.ITransition.
graph BT Type-->Base0["AnimancerTransitionAssetBase"] click Base0 "/animancer-v7-4/api/Animancer/AnimancerTransitionAssetBase" Base0-->Base1["ScriptableObject"] Type-.->Interface0["ITransition"] click Interface0 "/animancer-v7-4/api/Animancer/ITransition" Type-.->Interface1["IHasKey"] click Interface1 "/animancer-v7-4/api/Animancer/IHasKey" Type-.->Interface2["IPolymorphic"] click Interface2 "/animancer-v7-4/api/Animancer/IPolymorphic" Type-.->Interface3["IWrapper"] click Interface3 "/animancer-v7-4/api/Animancer/IWrapper" Type-.->Interface4["IAnimationClipSource"] Type["AnimancerTransitionAsset<TTransition>"] class Type type-node Derived0["LinearMixerTransitionAsset"]-->Type click Derived0 "/animancer-v7-4/api/Animancer/LinearMixerTransitionAsset" Derived1["ControllerTransitionAsset"]-->Type click Derived1 "/animancer-v7-4/api/Animancer/ControllerTransitionAsset" Derived2["ManualMixerTransitionAsset"]-->Type click Derived2 "/animancer-v7-4/api/Animancer/ManualMixerTransitionAsset" Derived3["Float1ControllerTransitionAsset"]-->Type click Derived3 "/animancer-v7-4/api/Animancer/Float1ControllerTransitionAsset" Derived4["AnimancerTransitionAsset"]-->Type click Derived4 "/animancer-v7-4/api/Animancer/AnimancerTransitionAsset" Derived5["Float2ControllerTransitionAsset"]-->Type click Derived5 "/animancer-v7-4/api/Animancer/Float2ControllerTransitionAsset" Derived6["MixerTransition2DAsset"]-->Type click Derived6 "/animancer-v7-4/api/Animancer/MixerTransition2DAsset" Derived7["Float3ControllerTransitionAsset"]-->Type click Derived7 "/animancer-v7-4/api/Animancer/Float3ControllerTransitionAsset" Derived8["PlayableAssetTransitionAsset"]-->Type click Derived8 "/animancer-v7-4/api/Animancer/PlayableAssetTransitionAsset" Derived9["ClipTransitionAsset"]-->Type click Derived9 "/animancer-v7-4/api/Animancer/ClipTransitionAsset"

Syntax

[HelpURL(Strings.DocsURLs.APIDocumentation + "/" + nameof(AnimancerTransitionAsset<ITransition>) + "_1")]
public class AnimancerTransitionAsset<TTransition> : AnimancerTransitionAssetBase, ITransition, 
    IHasKey, IPolymorphic, IWrapper, IAnimationClipSource
    where TTransition : ITransition

Remarks

Documentation: Transition Assets

When adding a UnityEngine.CreateAssetMenuAttribute to any derived classes, you can use Animancer.Strings.MenuPrefix and Animancer.Strings.AssetMenuOrder.

If you are using Animancer.AnimancerEvents, consider using an Animancer.AnimancerTransitionAssetBase.UnShared`1 instead of referencing this asset directly in order to avoid common issues with shared events.

Attributes

Type Description
HelpURLAttribute

Type Parameters

Name Description
TTransition

Properties

Name Value Summary
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).
HasTransition bool
Is the Animancer.AnimancerTransitionAsset`1.Transition assigned (i.e. not null)?
IsValid bool
Can this transition create a valid Animancer.AnimancerState?
Key Object
An identifier object that can be used for dictionaries and hash sets.
Transition TTransition
[UnityEngine.SerializeReference] The Animancer.ITransition wrapped by this UnityEngine.ScriptableObject.

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).
GetAnimationClips(List<AnimationClip>) void
[UnityEngine.IAnimationClipSource] Calls Animancer.AnimancerUtilities.GatherFromSource(System.Collections.Generic.ICollection{UnityEngine.AnimationClip},System.Object).
GetTransition() ITransition
Returns the Animancer.ITransition wrapped by this UnityEngine.ScriptableObject.
Reset() void
[Editor-Only] Assigns a default TTransition to the Animancer.AnimancerTransitionAsset`1.Transition field.