Create
Creates a read-write 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
Create(RigDefinition, NativeArray<WeightData>)
Creates a read-write AnimationStreamMask from a RigDefinition and a NativeArray of WeightData.
public static AnimationStreamMask Create(ref RigDefinition rig, NativeArray<WeightData> buffer)
Parameters
The rig definition that describes the layout of the weight data.
Returns
Type | Description |
|---|---|
| AnimationStreamMask | A read-write AnimationStreamMask that views |
Create(RigDefinition, Allocator)
Creates a read-write AnimationStreamMask that allocates and owns its buffer.
public static AnimationStreamMask Create(ref RigDefinition rig, Allocator allocator)
Parameters
The rig definition that describes the layout of the weight data.
Returns
Type | Description |
|---|---|
| AnimationStreamMask | A read-write AnimationStreamMask. Returns a default mask if |
Remarks
The method clears the buffer, which holds BindingSet.StreamMaskSize elements, so that every weight is 0. Call AnimationStreamMask.Dispose to free the buffer, for example with a statement. If safety checks are enabled, any copy of the mask throws an when you use it after you dispose the mask.
usingObjectDisposedException