AnimancerNode Class

Summary

Base class for Animancer.AnimancerNode.Playable wrapper objects in an Animancer.AnimancerPlayable.
Assembly
Animancer.dll
Namespace
Animancer
Interfaces
Base Types
Derived Types
graph BT Type-->Base0["Key"] click Base0 "/animancer/api/Animancer/Key" Base0-->Base1["Object"] Type-.->Interface0["IUpdatable"] click Interface0 "/animancer/api/Animancer/IUpdatable" Type-.->Interface1["Key.IListItem"] click Interface1 "/animancer/api/Animancer/IListItem" Type-.->Interface2["IEnumerable<AnimancerState>"] Type-.->Interface3["IEnumerator"] Type-.->Interface4["IPlayableWrapper"] click Interface4 "/animancer/api/Animancer/IPlayableWrapper" Type-.->Interface5["ICopyable<AnimancerNode>"] Type["AnimancerNode"] class Type type-node Derived0["AnimancerState"]-->Type click Derived0 "/animancer/api/Animancer/AnimancerState" Derived1["AnimancerLayer"]-->Type click Derived1 "/animancer/api/Animancer/AnimancerLayer"

Syntax

public abstract class AnimancerNode : Key, IUpdatable, Key.IListItem, IEnumerable<AnimancerState>, 
    IEnumerator, IPlayableWrapper, ICopyable<AnimancerNode>

Constructors

Name Summary
AnimancerNode() Creates a new Animancer.AnimancerNode.

Fields

Name Constant Value Summary
NotInList -1
The Animancer.Key._Index which indicates that an item isn't in a list.
Inherited from Key
static

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?
ApplyFootIK bool
Should this object and its children apply IK to the character's feet?
ApplyParentAnimatorIK bool
Should setting the Animancer.AnimancerNode.Parent also set this node's Animancer.AnimancerNode.ApplyAnimatorIK to match it? Default is true.
static
ApplyParentFootIK bool
Should setting the Animancer.AnimancerNode.Parent also set this node's Animancer.AnimancerNode.ApplyFootIK to match it? Default is true.
static
ChildCount int
[Animancer.IPlayableWrapper] The number of states using this node as their Animancer.AnimancerState.Parent.
DebugName string
[Assert-Only] The Inspector display name of this node.
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.
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.
FadeSpeed float
The speed at which this node is fading towards the Animancer.AnimancerNode.TargetWeight.
Index int
The index of the port this node is connected to on the parent's Animancer.AnimancerNode.Playable.
IsValid bool
Is the Animancer.AnimancerNode.Playable usable (properly initialized and not destroyed)?
KeepChildrenConnected bool
Indicates whether child playables should stay connected to this mixer at all times (default false).
Layer AnimancerLayer
The root Animancer.AnimancerLayer which this node is connected to.
Parent IPlayableWrapper
The object which receives the output of this node.
Playable Playable
The internal UnityEngine.Playables.Playable managed by this node.
Root AnimancerPlayable
The Animancer.AnimancerPlayable at the root of the graph.
Speed float
[Pro-Only] How fast the Animancer.AnimancerState.Time is advancing every frame (default 1).
TargetWeight float
The desired Animancer.AnimancerNode.Weight which this node is fading towards according to the Animancer.AnimancerNode.FadeSpeed.
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?
static
UnsupportedSpeedMessage 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.
Weight float
The current blend weight of this node which determines how much it affects the final output.

Methods

Name Value Summary
~AnimancerNode() void
[Assert-Only] Checks Animancer.OptionalWarning.UnusedNode.
AppendDescription(StringBuilder, string) void
Appends a detailed descrption of the current details of this node.
AppendDetails(StringBuilder, string) void
Called by Animancer.AnimancerNode.AppendDescription(System.Text.StringBuilder,System.String) to append the details of this node.
AppendIKDetails(StringBuilder, string, IPlayableWrapper) void
Appends the details of Animancer.IPlayableWrapper.ApplyAnimatorIK and Animancer.IPlayableWrapper.ApplyFootIK.
static
ApplyWeight() void
Applies the Animancer.AnimancerNode.Weight to the connection between this node and its Animancer.AnimancerNode.Parent.
AssertConnectionWeight() 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.
AssertConnectionWeightRecursive(IPlayableWrapper) void
[Assert-Only] Calls Animancer.AnimancerNode.AssertConnectionWeight for this node and all of its children.
static
CopyIKFlags(AnimancerNode) void
Copies the IK settings from the Animancer.AnimancerNode.Parent:
  • If is true, copy .
  • If is true, copy .
CreatePlayable() void
Creates and assigns the Animancer.AnimancerNode.Playable managed by this node.
CreatePlayable(Playable) void
Creates and assigns the Animancer.AnimancerNode.Playable managed by this node.
DestroyPlayable() void
Destroys the Animancer.AnimancerNode.Playable.
GetChild(int) AnimancerState
[Animancer.IPlayableWrapper] Returns the state connected to the specified `index` as a child of this node.
GetConstructorStackTrace(AnimancerNode) StackTrace
[Assert-Only] Returns the stack trace of the constructor (or null if Animancer.AnimancerNode.TraceConstructor was false).
static
GetDescription(string) string
Returns a detailed descrption of the current details of this node.
GetEnumerator() FastEnumerator<AnimancerState>
Gets an enumerator for all of this node's child states.
IndexOf(Key) 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(Key) bool
Is the `key` currently in a keyed list?
Inherited from Key
static
IsPlayingAndNotEnding() bool
Is this node playing and not yet at its end?
OnAddChild(IList<AnimancerState>, AnimancerState) void
Connects the `state` to this node at its Animancer.AnimancerNode.Index.
RecreatePlayable() void
Calls Animancer.AnimancerNode.DestroyPlayable and Animancer.AnimancerNode.CreatePlayable.
RecreatePlayableRecursive() void
Calls Animancer.AnimancerNode.RecreatePlayable on this node and all its children recursively.
RequireUpdate() void
Calls Animancer.AnimancerPlayable.RequirePreUpdate(Animancer.IUpdatable) if the Animancer.AnimancerNode.Root is not null.
SetDebugName(string) void
[Assert-Conditional] Sets the Inspector display name of this node. Animancer.AnimancerNode.ToString returns the name.
SetWeight(float) 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.
StartFade(float) void
Calls Animancer.AnimancerNode.OnStartFade and starts fading the Animancer.AnimancerNode.Weight over the course of the Animancer.AnimancerPlayable.DefaultFadeDuration (in seconds).
StartFade(float, float) void
Calls Animancer.AnimancerNode.OnStartFade and starts fading the Animancer.AnimancerNode.Weight over the course of the `fadeDuration` (in seconds).
Stop() void
Stops the animation and makes it inactive immediately so it no longer affects the output. Sets Animancer.AnimancerNode.Weight = 0 by default.
ToString() string
The Inspector display name of this node.

Extension Methods

Name Value Summary
CalculateEditorFadeDuration(float) 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?