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

ReadOnly

struct in Unity.Collections.LowLevel.Unsafe

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

A read only for an UnsafeList<T>.

Use UnsafeList<T0>.AsReadOnly to create a read only for a list.

Properties

Property Description
IsCreated Whether this list has been allocated (and not yet deallocated).
IsEmpty Whether the list is empty.
Length The number of elements.
Ptr The internal buffer of the list.

Public Methods

Method Description
AsReadOnlySpan Returns ReadOnlySpan<T> view of this container.
GetEnumerator Returns an enumerator over the elements of the list.
GetUnsafeReadOnlyPtr Get a pointer to the data.