GetBoneIndex(StringHash)
Finds the index of the skeleton node that has an identifier.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public int GetBoneIndex(StringHash id)
Parameters
The SkeletonNode.Id of the node to find.
Returns
Type | Description |
|---|---|
| int | The index of the node. If no node has the identifier, returns |
Remarks
The index is the bone index in the RigDefinition that RigBuilder.ToRigDefinition creates. Use it to set the SkeletonNode.ParentIndex of a node from the identifier of its parent. The method searches the nodes linearly, like Skeleton.FindBoneIndex does on a rig definition.