Summary
Base class for all states in an
Animancer.AnimancerPlayable
graph which manages one or more
UnityEngine.Playables.Playable
s.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IUpdatable
- Key
.IListItem - IEnumerable
<AnimancerState> - IEnumerator
- IPlayableWrapper
- ICopyable
<AnimancerNode> - I
Animation Clip Collection - ICopyable
<AnimancerState>
- Base Types
-
- Object
- Key
- AnimancerNode
- Derived Types
graph BT
Type-->Base0["AnimancerNode"]
click Base0 "/animancer-v7-4/api/Animancer/AnimancerNode"
Base0-->Base1["Key"]
click Base1 "/animancer-v7-4/api/Animancer/Key"
Base1-->Base2["Object"]
Type-.->Interface0["IUpdatable"]
click Interface0 "/animancer-v7-4/api/Animancer/IUpdatable"
Type-.->Interface1["Key.IListItem"]
click Interface1 "/animancer-v7-4/api/Animancer/IListItem"
Type-.->Interface2["IEnumerable<AnimancerState>"]
Type-.->Interface3["IEnumerator"]
Type-.->Interface4["IPlayableWrapper"]
click Interface4 "/animancer-v7-4/api/Animancer/IPlayableWrapper"
Type-.->Interface5["ICopyable<AnimancerNode>"]
Type-.->Interface6["IAnimationClipCollection"]
click Interface6 "/animancer-v7-4/api/Animancer/IAnimationClipCollection"
Type-.->Interface7["ICopyable<AnimancerState>"]
Type["AnimancerState"]
class Type type-node
Derived0["ManualMixerState"]-->Type
click Derived0 "/animancer-v7-4/api/Animancer/ManualMixerState"
Derived1["ClipState"]-->Type
click Derived1 "/animancer-v7-4/api/Animancer/ClipState"
Derived2["ControllerState"]-->Type
click Derived2 "/animancer-v7-4/api/Animancer/ControllerState"
Derived3["PlayableAssetState"]-->Type
click Derived3 "/animancer-v7-4/api/Animancer/PlayableAssetState"
Syntax
public abstract class AnimancerState : AnimancerNode, IUpdatable, Key.IListItem,
IEnumerable<AnimancerState>, IEnumerator, IPlayableWrapper, ICopyable<AnimancerNode>,
IAnimationClipCollection, ICopyable<AnimancerState>
Remarks
This class can be used as a custom yield instruction to wait until the animation either stops playing or
reaches its end.
Documentation: States
Fields
Properties
Name | Value | Summary |
---|---|---|
ApplyAnimatorIK | bool |
Should Unity call
OnAnimatorIK on the animated object while this object and its children have any
Animancer.AnimancerNode.Weight ?
Inherited from AnimancerNode
|
ApplyFootIK | bool |
Should this object and its children apply IK to the character's feet?
Inherited from AnimancerNode
|
Apply |
bool |
Should setting the
Animancer.AnimancerNode.Parent also set this node's Animancer.AnimancerNode.ApplyAnimatorIK to match it?
Default is true.
Inherited from AnimancerNode
static
|
ApplyParentFootIK | bool |
Should setting the
Animancer.AnimancerNode.Parent also set this node's Animancer.AnimancerNode.ApplyFootIK to match it?
Default is true.
Inherited from AnimancerNode
static
|
Automatically |
bool |
Should the
Animancer.AnimancerState.Events be cleared automatically whenever Animancer.AnimancerState.Play , Animancer.AnimancerState.Stop ,
or Animancer.AnimancerState.OnStartFade are called? Default true.
static
|
AverageVelocity | Vector3 |
The average velocity of the root motion caused by this state.
|
ChildCount | int |
[
Animancer.IPlayableWrapper ]
The number of states using this node as their Animancer.AnimancerState.Parent .
Inherited from AnimancerNode
|
Clip | AnimationClip |
The
UnityEngine.AnimationClip which this state plays (if any). |
DebugName | string |
[Assert-Only] The Inspector display name of this node.
Inherited from AnimancerNode
|
Duration | float |
The number of seconds the animation will take to play fully at its current
Animancer.AnimancerNode.EffectiveSpeed .
|
EffectiveSpeed | float |
The
Animancer.AnimancerNode.Speed of this node multiplied by the Animancer.AnimancerNode.Speed of each of its parents to
determine the actual speed it's playing at.
Inherited from AnimancerNode
|
EffectiveWeight | float |
The
Animancer.AnimancerNode.Weight of this state multiplied by the Animancer.AnimancerNode.Weight of each of its parents down
the hierarchy to determine how much this state affects the final output.
Inherited from AnimancerNode
|
Events | AnimancerEvent |
A list of
Animancer.AnimancerEvent s that will occur while this state plays as well as one that
specifically defines when this state ends.
|
FadeSpeed | float |
The speed at which this node is fading towards the
Animancer.AnimancerNode.TargetWeight .Inherited from AnimancerNode
|
HasEvents | bool |
Does this state have an
Animancer.AnimancerEvent.Sequence ? |
Index | int |
The index of the port this node is connected to on the parent's
Animancer.AnimancerNode.Playable .Inherited from AnimancerNode
|
IsActive | bool |
Returns true if this state is playing and is at or fading towards a non-zero
Animancer.AnimancerNode.Weight .
|
IsLooping | bool |
Will this state loop back to the start when it reaches the end?
|
IsPlaying | bool |
Is the
Animancer.AnimancerState.Time automatically advancing? |
IsStopped | bool |
Returns true if this state isn't playing and is at 0
Animancer.AnimancerNode.Weight .
|
IsValid | bool |
Is the
Animancer.AnimancerNode.Playable usable (properly initialized and not destroyed)?Inherited from AnimancerNode
|
Keep |
bool |
Indicates whether child playables should stay connected to this mixer at all times (default false).
Inherited from AnimancerNode
|
Key | Object |
The object used to identify this state in the root
Animancer.AnimancerPlayable.States dictionary.
Can be null.
|
Layer | AnimancerLayer |
The root
Animancer.AnimancerLayer which this node is connected to. |
LayerIndex | int |
The index of the
Animancer.AnimancerLayer this state is connected to (determined by the
Animancer.AnimancerState.Parent ). Returns -1 if this state is not connected to a layer.
|
Length | float |
The total time this state would take to play in seconds when
Animancer.AnimancerNode.Speed = 1. |
MainObject | Object |
The main object to show in the Inspector for this state (if any).
|
NormalizedEndTime | float |
[Pro-Only]
The
Animancer.AnimancerState.NormalizedTime after which the Animancer.AnimancerEvent.Sequence.OnEnd callback will
be invoked every frame.
|
NormalizedTime | float |
The
Animancer.AnimancerState.Time of this state as a portion of the animation's Animancer.AnimancerState.Length , meaning the
value goes from 0 to 1 as it plays from start to end, regardless of how long that actually takes.
|
NormalizedTimeD | double |
The underlying
double value of Animancer.AnimancerState.NormalizedTime . |
Parent | IPlayableWrapper |
The object which receives the output of the
UnityEngine.Playables.Playable . |
Playable | Playable |
The internal
UnityEngine.Playables.Playable managed by this node.Inherited from AnimancerNode
|
RawTime | double |
The internal implementation of
Animancer.AnimancerState.Time which directly gets and sets the underlying value.
|
RemainingDuration | float |
The number of seconds this state will take to go from its current
Animancer.AnimancerState.NormalizedTime to the
Animancer.AnimancerState.NormalizedEndTime at its current Animancer.AnimancerNode.EffectiveSpeed .
|
Root | AnimancerPlayable |
The
Animancer.AnimancerPlayable at the root of the graph.Inherited from AnimancerNode
|
Speed | float |
[Pro-Only] How fast the
Animancer.AnimancerState.Time is advancing every frame (default 1).Inherited from AnimancerNode
|
TargetWeight | float |
The desired
Animancer.AnimancerNode.Weight which this node is fading towards according to the
Animancer.AnimancerNode.FadeSpeed .
Inherited from AnimancerNode
|
Time | float |
The number of seconds that have passed since the start of this animation.
|
TimeD | double |
The underlying
double value of Animancer.AnimancerState.Time . |
TraceConstructor | bool |
[Assert-Only]
Should a
System.Diagnostics.StackTrace be captured in the constructor of all new nodes so
Animancer.OptionalWarning.UnusedNode can include it in the warning if that node ends up being unused?
Inherited from AnimancerNode
static
|
Unsupported |
string |
[Assert-Only]
Returns
null if Animancer Events will work properly on this type of state, or a message explaining
why they might not work.
|
Unsupported |
string |
[Assert-Only]
Returns null if the
Animancer.AnimancerNode.Speed property will work properly on this type of node, or a message
explaining why it won't work.
Inherited from AnimancerNode
|
Weight | float |
The current blend weight of this node which determines how much it affects the final output.
Inherited from AnimancerNode
|
Methods
Name | Value | Summary |
---|---|---|
~AnimancerNode |
void |
[Assert-Only] Checks
Animancer.OptionalWarning.UnusedNode .Inherited from AnimancerNode
|
AppendDescription |
void |
Appends a detailed descrption of the current details of this node.
Inherited from AnimancerNode
|
AppendDetails |
void |
Called by
Animancer.AnimancerNode.AppendDescription(System.Text.StringBuilder,System.String) to append the details of this node. |
AppendIKDetails |
void |
Appends the details of
Animancer.IPlayableWrapper.ApplyAnimatorIK and
Animancer.IPlayableWrapper.ApplyFootIK .
Inherited from AnimancerNode
static
|
ApplyWeight |
void |
Applies the
Animancer.AnimancerNode.Weight to the connection between this node and its Animancer.AnimancerNode.Parent .
Inherited from AnimancerNode
|
Assert |
void |
[Assert-Only]
Logs an error if the weight of the connection between the
Animancer.AnimancerNode.Parent and this node does not match
the Animancer.AnimancerNode.Weight .
Inherited from AnimancerNode
|
Assert |
void |
[Assert-Only] Calls
Animancer.AnimancerNode.AssertConnectionWeight for this node and all of its children.Inherited from AnimancerNode
static
|
CancelSetTime |
void |
Prevents the
Animancer.AnimancerState.RawTime from being applied. |
ChangeMainObject |
void |
Sets the `currentObject` and calls
Animancer.AnimancerNode.RecreatePlayable . If the `currentObject` was
being used as the Animancer.AnimancerState.Key then it is changed as well.
|
Clone |
AnimancerState |
Creates a copy of this state with the same
Animancer.AnimancerNode.Root . |
Clone |
AnimancerState |
Creates a copy of this state with the specified
Animancer.AnimancerNode.Root . |
CopyIKFlags |
void |
Copies the IK settings from the
Animancer.AnimancerNode.Parent :
Inherited from AnimancerNode
|
CreatePlayable |
void |
Creates and assigns the
UnityEngine.Playables.Playable managed by this state. |
CreatePlayable |
void |
Creates and assigns the
Animancer.AnimancerNode.Playable managed by this node.Inherited from AnimancerNode
|
Destroy |
void |
Destroys the
UnityEngine.Playables.Playable and cleans up this state. |
DestroyPlayable |
void |
Destroys the
Animancer.AnimancerNode.Playable .Inherited from AnimancerNode
|
GatherAnimationClips |
void |
[
Animancer.IAnimationClipCollection ] Gathers all the animations in this state. |
GetChild |
AnimancerState |
[
Animancer.IPlayableWrapper ]
Returns the state connected to the specified `index` as a child of this node.
Inherited from AnimancerNode
|
Get |
StackTrace |
[Assert-Only]
Returns the stack trace of the constructor (or null if
Animancer.AnimancerNode.TraceConstructor was false).
Inherited from AnimancerNode
static
|
GetDescription |
string |
Returns a detailed descrption of the current details of this node.
Inherited from AnimancerNode
|
GetEnumerator |
FastEnumerator |
Gets an enumerator for all of this node's child states.
Inherited from AnimancerNode
|
GetPath |
string |
Returns the hierarchy path of this state through its
Animancer.AnimancerState.Parent s. |
IndexOf |
int |
Returns location of this object in the list (or
-1 if it is not currently in a keyed list).Inherited from Key
static
|
IsInList |
bool |
Is the `key` currently in a keyed list?
Inherited from Key
static
|
Is |
bool |
Returns true if the animation is playing and has not yet passed the
Animancer.AnimancerEvent.Sequence.EndEvent .
|
MoveTime |
void |
Sets the
Animancer.AnimancerState.Time or Animancer.AnimancerState.NormalizedTime , but unlike those properties this method
applies any Root Motion and Animation Events (but not Animancer Events) between the old and new time.
|
MoveTime |
void |
Sets the
Animancer.AnimancerState.Time or Animancer.AnimancerState.NormalizedTime , but unlike those properties this method
applies any Root Motion and Animation Events (but not Animancer Events) between the old and new time.
|
OnAddChild |
void |
Connects the `state` to this node at its
Animancer.AnimancerNode.Index .Inherited from AnimancerNode
|
OnSetIsPlaying |
void |
Called when the value of
Animancer.AnimancerState.IsPlaying is changed. |
Play |
void |
Plays this state immediately, without any blending.
Unlike
Animancer.AnimancerPlayable.Play(Animancer.AnimancerState) , this method only affects this state and won't
stop any others that are playing.
|
RecreatePlayable |
void |
Calls
Animancer.AnimancerNode.DestroyPlayable and Animancer.AnimancerNode.CreatePlayable .Inherited from AnimancerNode
|
Recreate |
void |
Calls
Animancer.AnimancerNode.RecreatePlayable on this node and all its children recursively.Inherited from AnimancerNode
|
RequireUpdate |
void |
Calls
Animancer.AnimancerPlayable.RequirePreUpdate(Animancer.IUpdatable) if the Animancer.AnimancerNode.Root is not null.Inherited from AnimancerNode
|
SetDebugName |
void |
[Assert-Conditional]
Sets the Inspector display name of this node.
Animancer.AnimancerNode.ToString returns the name.
Inherited from AnimancerNode
|
SetNewCloneRoot |
void |
Sets the
Animancer.AnimancerNode.Root . |
SetParent |
void |
Connects this state to the `parent` state at the specified `index`.
|
SetRoot |
void |
The
Animancer.AnimancerPlayable at the root of the graph. |
SetWeight |
void |
Sets the current blend weight of this node which determines how much it affects the final output.
0 has no effect while 1 applies the full effect of this node.
This method allows any fade currently in progress to continue. If you don't wish to do that, you can set
the
Animancer.AnimancerNode.Weight property instead.
Animancer Lite only allows this value to be set to 0 or 1 in runtime builds.
Inherited from AnimancerNode
|
StartFade |
void |
Calls
Animancer.AnimancerNode.OnStartFade and starts fading the Animancer.AnimancerNode.Weight over the course
of the Animancer.AnimancerPlayable.DefaultFadeDuration (in seconds).
Inherited from AnimancerNode
|
StartFade |
void |
Calls
Animancer.AnimancerNode.OnStartFade and starts fading the Animancer.AnimancerNode.Weight over the course
of the `fadeDuration` (in seconds).
Inherited from AnimancerNode
|
Stop |
void |
Stops the animation and makes it inactive immediately so it no longer affects the output.
|
ToString |
string |
Returns the
Animancer.AnimancerNode.DebugName if one is set, otherwise a string describing the type of this
state and the name of the Animancer.AnimancerState.MainObject .
|
Extension Methods
Name | Value | Summary |
---|---|---|
Calculate |
float |
[Animancer Extension] [Editor-Only]
Returns the duration of the `node`s current fade (if any), otherwise returns the `defaultDuration`.
|
IsValid |
bool |
[Animancer Extension] Is the `node` is not null and
Animancer.AnimancerNode.IsValid ?From AnimancerUtilities
|