Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UnsafeRingQueue

Initializes and returns an instance of UnsafeRingQueue which aliasing an existing buffer.
Read time 1 minuteLast updated 17 days ago

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.