文档

Unity Engine

Unity Engine

UnsafeRingQueue

Initializes and returns an instance of UnsafeRingQueue which aliasing an existing buffer.
阅读时间1 分钟最后更新于 1 个月前

Definition

UnsafeRingQueue(`0*, int)

Initializes and returns an instance of UnsafeRingQueue which aliasing an existing buffer.
public UnsafeRingQueue(T* ptr, int capacity)

Parameters

ptr

An existing buffer to set as the internal buffer.

capacity

The capacity.

UnsafeRingQueue(int, AllocatorHandle, NativeArrayOptions)

Initializes and returns an instance of UnsafeRingQueue.
public UnsafeRingQueue(int capacity, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)

Parameters

capacity

The capacity.

The allocator to use.

Whether newly allocated bytes should be zeroed out.