AnimancerNode.

Index Property

Summary

The index of the port this node is connected to on the parent's UnityEngine.Playables.Playable.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerNode

Syntax

public int Index { get; internal set; }

Remarks

A negative value indicates that it is not assigned to a port.

Indices are generally assigned starting from 0, ascending in the order they are connected to their layer. They will not usually change unless the Animancer.AnimancerNodeBase.Parent changes or another state on the same layer is destroyed so the last state is swapped into its place to avoid shuffling everything down to cover the gap.

The setter is internal so user defined states cannot set it incorrectly. Ideally, Animancer.AnimancerLayer should be able to set the port in its constructor and Animancer.AnimancerState.SetParent(Animancer.AnimancerNode) should also be able to set it, but classes that further inherit from there should not be able to change it without properly calling that method.

Value

Type Description
int