文档

Unity Engine

Unity Engine

UnsafeList

Initializes and returns an instance of UnsafeList.
阅读时间1 分钟最后更新于 2 个月前

Definition

UnsafeList(`0*, int)

Initializes and returns an instance of UnsafeList.
public UnsafeList(T* ptr, int length)

Parameters

ptr

An existing byte array to set as the internal buffer.

length

The length.

UnsafeList(int, AllocatorHandle, NativeArrayOptions)

Initializes and returns an instance of UnsafeList.
public UnsafeList(int initialCapacity, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory)

Parameters

initialCapacity

The initial capacity of the list.

The allocator to use.

Whether newly allocated bytes should be zeroed out.