AnimationTree
Evaluates clip states and blending through a resource graph.
The tree uses AnimationPlayer libraries; TreeRoot selects a StateMachine, BlendTree or BlendSpace graph. AnimationNode... resources are graph elements, not gameplay entities or ECS.
Change per-instance parameters through parameters/.... Retrieve playback at your StateMachine path; parameters/playback applies to a root state machine. The graph evaluates animation; it does not authorize gameplay actions or move a physics body for you.
Working graphs, transitions and root motion
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AnimationTreeConstructor
public AnimationTree();Properties4
AdvanceExpressionBaseEntityProperty
public EntityPath AdvanceExpressionBaseEntity { get; set; }The path to the Entity used to evaluate the AnimationNode Expression if one is not explicitly specified internally.
AnimPlayerProperty
public EntityPath AnimPlayer { get; set; }Path to the AnimationPlayer supplying libraries and the target root. It supplies clips rather than issuing Play(). While the tree controls properties, avoid parallel playback on that AnimationPlayer for the same targets.
ProcessCallbackProperty
public AnimationTree.AnimationProcessCallback ProcessCallback { get; set; }TreeRootProperty
public AnimationRootNode TreeRoot { get; set; }The graph root resource, such as StateMachine, BlendTree or BlendSpace. AnimationNode resources describe the graph, not the gameplay entity hierarchy. Set per-instance parameters through AnimationTree parameters/...; do not treat a shared resource as local character state.
Methods9
GetAdvanceExpressionBaseEntityEntityPath
public EntityPath GetAdvanceExpressionBaseEntity();EntityPathGetAnimationPlayerEntityPath
public EntityPath GetAnimationPlayer();EntityPathGetProcessCallbackAnimationTree.AnimationProcessCallback · Deprecated
public AnimationTree.AnimationProcessCallback GetProcessCallback();Returns the process notification in which to update animations.
AnimationTree.AnimationProcessCallbackGetTreeRootAnimationRootNode
public AnimationRootNode GetTreeRoot();AnimationRootNodeSetAdvanceExpressionBaseEntityvoid
public void SetAdvanceExpressionBaseEntity(EntityPath path);| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
SetAnimationPlayervoid
public void SetAnimationPlayer(EntityPath path);| Name | Type | Default |
|---|---|---|
path | EntityPath | — |
SetProcessCallbackvoid · Deprecated
public void SetProcessCallback(AnimationTree.AnimationProcessCallback mode);Sets the process notification in which to update animations.
| Name | Type | Default |
|---|---|---|
mode | AnimationTree.AnimationProcessCallback | — |
SetTreeRoot2 overloads
public void SetTreeRoot(AnimationNode root);| Name | Type | Default |
|---|---|---|
root | AnimationNode | — |
public void SetTreeRoot(AnimationRootNode animationNode);| Name | Type | Default |
|---|---|---|
animationNode | AnimationRootNode | — |
Signals and events1
AnimationPlayerChangedEvent
public event Action AnimationPlayerChanged;Emitted when the AnimationTree.AnimPlayer is changed.
AnimationTree.AnimationProcessCallback
| Value | Description |
|---|---|
Idle = 1 | |
Manual = 2 | |
Physics = 0 |