---
title: GetBoneIndex(StringHash)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/getboneindex
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/getboneindex.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:08:35.223Z
locale: en-us
---

# GetBoneIndex(StringHash)

> Finds the index of the skeleton node that has an identifier.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

```csharp
public int GetBoneIndex(StringHash id)
```

### Parameters

**** (\[StringHash]\(/engine/7000.0/script-reference/unity/animations/stringhash)): The [SkeletonNode.Id](/engine/7000.0/script-reference/unity/animations/skeletonnode/id.md) of the node to find.

### Returns

| Type                                                       | Description                                                         |
| ---------------------------------------------------------- | ------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the node. If no node has the identifier, returns `-1`. |

### Remarks

The index is the bone index in the [RigDefinition](/engine/7000.0/script-reference/unity/animations/rigdefinition.md) that [RigBuilder.ToRigDefinition](/engine/7000.0/script-reference/unity/animations/rigbuilder/torigdefinition.md) creates. Use it to set the [SkeletonNode.ParentIndex](/engine/7000.0/script-reference/unity/animations/skeletonnode/parentindex.md) of a node from the identifier of its parent. The method searches the nodes linearly, like [Skeleton.FindBoneIndex](/engine/7000.0/script-reference/unity/animations/skeleton/findboneindex.md) does on a rig definition.
