TransitionAsset Class

Summary

A UnityEngine.ScriptableObject based Animancer.ITransition.
graph BT Type-->Base0["TransitionAsset<ITransitionDetailed>"] Base0-->Base1["TransitionAssetBase"] click Base1 "/animancer/api/Animancer/TransitionAssetBase" Base1-->Base2["ScriptableObject"] 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["IPolymorphic"] click Interface3 "/animancer/api/Animancer/IPolymorphic" Type-.->Interface4["IHasEvents"] click Interface4 "/animancer/api/Animancer/IHasEvents" Type-.->Interface5["IWrapper"] click Interface5 "/animancer/api/Animancer/IWrapper" Type-.->Interface6["IAnimationClipSource"] Type["TransitionAsset"] class Type type-node

Syntax

[CreateAssetMenu(menuName = Strings.MenuPrefix + "Transition Asset", order = Strings.AssetMenuOrder + 1)]
[AnimancerHelpUrl(typeof(TransitionAsset))]
public class TransitionAsset : TransitionAsset<ITransitionDetailed>, ITransitionDetailed, 
    ITransition, IHasKey, IPolymorphic, IHasEvents, IWrapper, IAnimationClipSource

Remarks

Documentation: Transition Assets

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

Attributes

Type Description
CreateAssetMenuAttribute
AnimancerHelpUrlAttribute [Assert-Conditional] A UnityEngine.HelpURLAttribute which points to Animancer's documentation.

Fields

Name Constant Value Summary
ObsoleteEventsMessage Directly accessing the Events of a Transition Asset is generally not recommended because any modifications will affect all characters who share the same asset and will persist until the asset is destroyed (usually when the application exits). In most cases, the recommended approach is to initialize events on the AnimancerState returned when you Play the Transition rather than modifying the Asset itself. If you really need to access these events, you can use the asset.Transition.Events.
Explains why Transition Assets warn about accessing their events.
Inherited from TransitionAssetBase
static
TransitionField _Transition
The name of the serialized backing field of Animancer.TransitionAssetBase.GetTransition.
Inherited from TransitionAssetBase
static

Properties

Name Value Summary
CreateInstance Func<ITransitionDetailed, TransitionAssetBase>
[Editor-Only] Creates an instance of the main non-abstract inheritor of this class.
Inherited from TransitionAssetBase
static
Events AnimancerEvent.Sequence
Events which will be triggered as the animation plays.
Inherited from TransitionAssetBase
IsLooping bool
What will the value of Animancer.AnimancerState.IsLooping be for the created state?
Inherited from TransitionAssetBase
MaximumDuration float
The maximum amount of time the animation is expected to take (in seconds).
Inherited from TransitionAssetBase
NormalizedStartTime float
The Animancer.AnimancerState.NormalizedTime to start the animation at.
Inherited from TransitionAssetBase
SerializedEvents AnimancerEvent.Sequence.Serializable
Events which will be triggered as the animation plays.
Inherited from TransitionAssetBase
Speed float
The Animancer.AnimancerNodeBase.Speed to play the animation at.
Inherited from TransitionAssetBase

Methods

Name Value Summary
Create(Object) TransitionAsset
[Editor-Only] Creates a Animancer.TransitionAsset next to the `mainAsset`.
static
Reset() void
[Editor-Only] Assigns a default TTransition to the Animancer.TransitionAsset`1.Transition field.
ValidateCreate(Object) bool
[Editor-Only] Validates that the `mainAsset` is actually an asset.
static