기술 자료

Unity Engine

Unity Engine

NativeQueue<T>

An unmanaged queue.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public struct NativeQueue<T> : INativeDisposable, IDisposable where T : unmanaged

Constructors

Constructor

Description

NativeQueue`1(Unity.Collections.AllocatorManager.AllocatorHandle)Initializes and returns an instance of NativeQueue.

Properties

Property

Description

CountReturns the current number of elements in this queue.
IsCreatedWhether this queue has been allocated (and not yet deallocated).

Methods

Method

Description

AsParallelWriterReturns a parallel writer for this queue.
AsReadOnlyReturns a readonly version of this NativeQueue instance.
ClearRemoves all elements from this queue.
DequeueRemoves and returns the element at the front of this queue.
DisposeReleases all resources (memory and safety handles).
EnqueueAdds an element at the back of this queue.
IsEmptyReturns true if this queue is empty.
PeekReturns the element at the front of this queue without removing it.
ToArrayReturns an array containing a copy of this queue's content.
TryDequeueRemoves and outputs the element at the front of this queue.

Structs

Struct

Description

NativeQueue<T>.EnumeratorAn enumerator over the values of a container.
NativeQueue<T>.ParallelWriterA parallel writer for a NativeQueue.
NativeQueue<T>.ReadOnlyA read-only alias for the value of a NativeQueue. Does not have its own allocated storage.