---
title: ToRigReference(Avatar)
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/avatarextensions/torigreference
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/avatarextensions/torigreference.md
last_updated: 2026-11-30
generated_at: 2026-11-30T21:30:49.477Z
locale: en-us
---

# ToRigReference(Avatar)

> Acquires a reference to the rig definition of an avatar.

## 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 static BlobObjectReference<RigDefinition> ToRigReference(this Avatar avatar)
```

### Parameters

**** (\[Avatar]\(/engine/7000.0/script-reference/unityengine/avatar)): The avatar to get the rig definition from. Can be null.

### Returns

| Type                                                                                                       | Description                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [BlobObjectReference\<RigDefinition>](/engine/7000.0/script-reference/unityengine/blobobjectreference1.md) | The reference to the [RigDefinition](/engine/7000.0/script-reference/unity/animations/rigdefinition.md) of the avatar. Dispose the reference when you finish with it. [BlobObjectReference\<T>.IsValid](/engine/7000.0/script-reference/unityengine/blobobjectreference1/isvalid.md) is `false` if `avatar` is `null` or is not a valid avatar. |

### Remarks

Use this method to get the rig definition in a form that jobs and Burst-compiled code can read. The first call builds the rig definition from the avatar. The reference keeps the data alive until you dispose it, even if the avatar is destroyed or modified. Call this method from the main thread.

Only Generic avatars are supported. If `avatar` is a Humanoid avatar, this method logs a warning once for the avatar and ignores the Humanoid mapping. The rig definition has a bone for each transform of the avatar.
