Documentation

Unity Engine

Download Unity

Unity Engine

CreateReadOnly(ref RigDefinition, NativeArray<AnimatedData>)

Creates a read-only AnimationStream from a RigDefinition and a NativeArray of AnimatedData.
Read time 1 minuteLast updated 4 hours ago

Definition

CreateReadOnly(RigDefinition, NativeArray<AnimatedData>)

public static AnimationStream CreateReadOnly(ref RigDefinition rig, NativeArray<AnimatedData> buffer)

Parameters

The rig definition that describes the layout of the animated data in
buffer
.

The NativeArray<T> of AnimatedData that the stream views. Its length must equal BindingSet.StreamSize.

Returns

Type

Description

AnimationStreamA read-only AnimationStream. Returns a default stream if
rig
is a null reference, or if
buffer
is empty and the rig has a nonempty stream.

Remarks

The stream is a view of
buffer
and uses its safety handle. If safety checks are enabled, using the stream after you dispose the array throws an
ObjectDisposedException
. Disposing the stream doesn't dispose the array.