Documentation

Unity Engine

Download Unity

Unity Engine

ToRigReference(Avatar)

Acquires a reference to the rig definition of an avatar.
Read time 1 minuteLast updated 4 hours ago

Definition

public static BlobObjectReference<RigDefinition> ToRigReference(this Avatar avatar)

Parameters

avatar

The avatar to get the rig definition from. Can be null.

Returns

Type

Description

BlobObjectReference<RigDefinition>The reference to the RigDefinition of the avatar. Dispose the reference when you finish with it. BlobObjectReference<T>.IsValid 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.