ToWeightMaskReference(AvatarMask)
Acquires a reference to the weight mask of an avatar mask.
Read time 1 minuteLast updated 5 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
public static BlobObjectReference<WeightMask> ToWeightMaskReference(this AvatarMask mask)
Parameters
The avatar mask to get the weight mask from. Can be null.
Returns
Type | Description |
|---|---|
| BlobObjectReference<WeightMask> | The reference to the WeightMask of the avatar mask. Dispose the reference when you finish with it. BlobObjectReference<T>.IsValid is |
Remarks
Use this method to get the weight mask in a form that jobs and Burst-compiled code can read. The first call after the avatar mask changes builds the weight mask from the avatar mask. If the avatar mask has no transforms, the weight mask includes every transform. Otherwise, it includes only the transforms of the avatar mask, with their weights. The reference keeps the data alive until you dispose it, even if the avatar mask is destroyed or modified. Call this method from the main thread.