ドキュメント

Unity Engine

Unity Engine

NativeArray

Creates a new NativeArray and allocates enough memory to fit the provided amount of elements.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

NativeArray(int, Allocator, NativeArrayOptions)

Creates a new NativeArray and allocates enough memory to fit the provided amount of elements.
public NativeArray(int length, Allocator allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)

Parameters

length

Number of elements to allocate.

allocator

The Allocator to use for the data.

The NativeArrayOptions to use for the data.

NativeArray(`0[], Allocator)

Creates a NativeArray from an array of elements.
public NativeArray(T[] array, Allocator allocator)

Parameters

array

An array to copy the data from.

allocator

The Allocator to use for the data.

NativeArray(NativeArray<T>, Allocator)

Creates a NativeArray from an existing NativeArray.
public NativeArray(NativeArray<T> array, Allocator allocator)

Parameters

The NativeArray<T> to copy the data from.

allocator

The Allocator to use for the data.