Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UnsafeList<T>.ReadOnly

A read only for an UnsafeList\<T\>.
Read time 1 minuteLast updated 19 days ago

Definition

public struct UnsafeList<T>.ReadOnly : IEnumerable<T>, IEnumerable

Remarks

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

Fields

Value

Description

LengthThe number of elements.
PtrThe internal buffer of the list.

Properties

Property

Description

IsCreatedWhether this list has been allocated (and not yet deallocated).
IsEmptyWhether the list is empty.

Methods

Method

Description

AsReadOnlySpanReturns ReadOnlySpan\<T\> view of this container.
GetEnumeratorReturns an enumerator over the elements of the list.
GetUnsafeReadOnlyPtrGet a pointer to the data.