Interface INativeList<T>
A resizable list.
Namespace: Unity.Collections
Syntax
public interface INativeList<T> : IIndexable<T> where T : struct
Type Parameters
| Name | Description |
|---|---|
| T | The type of the elements. |
Properties
Capacity
The number of elements that fit in the current allocation.
Declaration
int Capacity { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 | The number of elements that fit in the current allocation. |
IsEmpty
Whether this list is empty.
Declaration
bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | True if this list is empty. |
Item[Int32]
The element at an index.
Declaration
T this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | An index. |
Property Value
| Type | Description |
|---|---|
| T | The element at the index. |
Exceptions
| Type | Condition |
|---|---|
| IndexOutOfRangeException | Thrown if index is out of bounds. |
Methods
Clear()
Sets the length to 0.
Declaration
void Clear()
Remarks
Does not change the capacity.