Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

NativeQueue<T0>

struct in Unity.Collections


Implements interfaces:INativeDisposable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

An unmanaged queue.

Properties

Property Description
Count Returns the current number of elements in this queue.
IsCreated Whether this queue has been allocated (and not yet deallocated).

Constructors

Constructor Description
NativeQueue_1 Initializes and returns an instance of NativeQueue.

Public Methods

Method Description
AsParallelWriter Returns a parallel writer for this queue.
AsReadOnly Returns a readonly version of this NativeQueue instance.
Clear Removes all elements from this queue.
Dequeue Removes and returns the element at the front of this queue.
Dispose Releases all resources (memory and safety handles).
Enqueue Adds an element at the back of this queue.
IsEmpty Returns true if this queue is empty.
Peek Returns the element at the front of this queue without removing it.
ToArray Returns an array containing a copy of this queue's content.
TryDequeue Removes and outputs the element at the front of this queue.