Summary
A serializable
Animancer.ITransition which can create a particular type of
Animancer.AnimancerState when passed into Animancer.AnimancerLayer.Play(Animancer.ITransition).
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
- Base Types
-
- Object
- Derived Types
graph BT
Type-->Base0["Object"]
Type-.->Interface0["ITransition<TState>"]
Type-.->Interface1["ITransition"]
click Interface1 "/animancer/api/Animancer/ITransition"
Type-.->Interface2["IHasEvents"]
click Interface2 "/animancer/api/Animancer/IHasEvents"
Type-.->Interface3["IHasKey"]
click Interface3 "/animancer/api/Animancer/IHasKey"
Type-.->Interface4["IPolymorphic"]
click Interface4 "/animancer/api/Animancer/IPolymorphic"
Type-.->Interface5["ICopyable<Transition<TState>>"]
Type-.->Interface6["ICloneable<Transition<TState>>"]
Type["Transition<TState>"]
class Type type-node
Derived0["ClipTransition"]-->Type
click Derived0 "/animancer/api/Animancer/ClipTransition"
Derived1["ControllerTransition<TState>"]-->Type
click Derived1 "/animancer/api/Animancer/ControllerTransition_1"
Derived2["TransitionSequence"]-->Type
click Derived2 "/animancer/api/Animancer/TransitionSequence"
Derived3["PlayableAssetTransition"]-->Type
click Derived3 "/animancer/api/Animancer/PlayableAssetTransition"
Derived4["ManualMixerTransition<TMixer>"]-->Type
click Derived4 "/animancer/api/Animancer/ManualMixerTransition_1"
Syntax
[Serializable]
public abstract class Transition<TState> : ITransition<TState>, ITransition, IHasEvents, IHasKey,
IPolymorphic, ICopyable<Transition<TState>>, ICloneable<Transition<TState>>
where TState : AnimancerState
Remarks
Documentation:
Transitions
Attributes
| Type | Description |
|---|---|
| Serializable |
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.Transition`1.Apply(Animancer.AnimancerState) (usually by AnimancerGraph.Play(ITransition)).
You can use Animancer.AnimancerStateDictionary.GetOrCreate(Animancer.ITransition) or
Animancer.AnimancerLayer.GetOrCreateState(Animancer.ITransition) to get or create the state for a
specific object.
Animancer.Transition`1.State is simply a shorthand for casting this to TState.
|
| Events | AnimancerEvent |
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.AnimancerLayer.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. |
| MaximumLength | float |
The maximum expected value of the
Animancer.AnimancerState.Length. |
| Name | string |
The display name of this transition.
|
| NormalizedStartTime | float |
The
Animancer.AnimancerState.NormalizedTime to start the animation at. |
| SerializedEvents | AnimancerEvent |
Events which will be triggered as the animation plays.
|
| Speed | float |
[
UnityEngine.SerializeField]
Determines how fast the animation plays (1x = normal speed, 2x = double speed).
|
| State | TState |
The state that was created by this object. Specifically, this is the state that was most recently
passed into
Animancer.Transition`1.Apply(Animancer.AnimancerState) (usually by AnimancerGraph.Play(ITransition)).
|
Methods
| Name | Value | Summary |
|---|---|---|
| Apply |
void |
Applies the details of this transition to the `state`.
|
| Apply |
void |
Applies the `normalizedStartTime` to the `state`.
static
|
| Clone |
Transition |
Creates a new object with the same type and values this.
|
| CopyFrom |
void |
Copies the contents of `copyFrom` into this object, replacing its previous contents.
|
| Create |
TState |
Calls
Animancer.Transition`1.CreateState and assigns the Animancer.Transition`1.Events to the state. |
| CreateState |
TState |
Creates and returns a new TState.
|
| ReconcileMainObject |
AnimancerState |
If a state exists with its
Animancer.AnimancerState.MainObject not matching the
Animancer.Transition`1.MainObject, this method returns a new state for the correct object.
|
| ReconcileMainObject |
AnimancerState |
If the
Animancer.AnimancerState.MainObject doesn't match the Animancer.Transition`1.MainObject,
this method returns a new state for the correct object.
|
| ToString |
string |
Returns the
Animancer.Transition`1.Name and type of this transition. |