CreateReadOnly
Creates a read-only AnimationStreamMask from a RigDefinition and a NativeArray of WeightData.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
CreateReadOnly(RigDefinition, NativeArray<WeightData>)
Creates a read-only AnimationStreamMask from a RigDefinition and a NativeArray of WeightData.
public static AnimationStreamMask CreateReadOnly(ref RigDefinition rig, NativeArray<WeightData> buffer)
Parameters
The rig definition that describes the layout of the weight data.
Returns
Type | Description |
|---|---|
| AnimationStreamMask | A read-only AnimationStreamMask that views |
CreateReadOnly(RigDefinition, WeightMaskSampler)
Creates a read-only AnimationStreamMask that reads the weights of a WeightMaskSampler.
public static AnimationStreamMask CreateReadOnly(ref RigDefinition rig, WeightMaskSampler weightMask)
Parameters
The rig definition that describes the layout of the weight data. It must be the rig that the sampler was created for.
The sampler that holds the weights.
Returns
Type | Description |
|---|---|
| AnimationStreamMask | The read-only mask. A default mask if |
Remarks
The mask is a view of the memory of the sampler and uses the safety handle of the sampler. Disposing the mask doesn't release the memory of the sampler. If safety checks are enabled, using the mask after you dispose the sampler throws an .
ObjectDisposedException