# GetBoneTransform(HumanBodyBones)

> Retrieves the Transform mapped to a human bone based on its id.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public Transform GetBoneTransform(HumanBodyBones humanBoneId)
```

### Parameters

**** (\[HumanBodyBones]\(/engine/6000.0/script-reference/unityengine/humanbodybones)): The human bone to be queried. See the [HumanBodyBones](/engine/6000.0/script-reference/unityengine/humanbodybones.md) enum for a list of possible values.

### Returns

| Type                                                                  | Description                                                                                                                                                                                                              |
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Transform](/engine/6000.0/script-reference/unityengine/transform.md) | Returns the [Transform](/engine/6000.0/script-reference/unityengine/transform.md) mapped to the human bone. Returns null if the human bone has no [Transform](/engine/6000.0/script-reference/unityengine/transform.md). |

### Remarks

Throws **InvalidOperationException** when Animator.avatar is *null*.

Throws **InvalidOperationException** when Animator.avatar is not a valid avatar.

Throws **InvalidOperationException** when Animator.avatar is not a Humanoid avatar.

Throws **IndexOutOfRangeException** when humanBoneId is not between 0 and HumanBodyBones.LastBone.
