Méthode | Description | |
---|---|---|
Add ( ) : void |
Adds an element to the list. If the list has reached its current capacity, it copies the original, internal array to a new, larger array, and then deallocates the original. |
|
AddNoResize ( value ) : void |
Adds an element to the list. If the list has reached its current capacity, internal array won't be resized, and exception will be thrown. |
|
AddRangeNoResize ( |
Adds elements from a list to this list. If the list has reached its current capacity, internal array won't be resized, and exception will be thrown. |
|
AddRangeNoResize ( void* ptr, int length ) : void |
Adds elements from a buffer to this list. If the list has reached its current capacity, internal array won't be resized, and exception will be thrown. |
|
GetUnsafeList ( ) : UnsafeList* |
Return internal UnsafeList*
|
|
NativeList ( Allocator allocator ) : System |
Constructs a new list using the specified type of memory allocation. The list initially has a capacity of one. To avoid reallocating memory for the list, specify sufficient capacity up front. |
|
NativeList ( int initialCapacity, Allocator allocator ) : System |
Constructs a new list with the specified initial capacity and type of memory allocation.
|
|
this ( int index ) : T |
Retrieve a member of the contaner by index.
|
Méthode | Description | |
---|---|---|
CreateStaticSafetyId ( ) : void | ||
ElementAt ( int index ) : T |
|
|
Initialize ( int initialCapacity, &allocator, int disposeSentinelStackDepth ) : void | ||
NativeList ( int initialCapacity, Allocator allocator, int disposeSentinelStackDepth ) : System | ||
New ( int initialCapacity, &allocator ) : NativeList |
||
New ( int initialCapacity, &allocator, int disposeSentinelStackDepth ) : NativeList |
public AddNoResize ( value ) : void | ||
value | The value to be added at the end of the list. | |
Résultat | void |
public AddRangeNoResize ( |
||
list | Other container to copy elements from. | |
Résultat | void |
public AddRangeNoResize ( void* ptr, int length ) : void | ||
ptr | void* | A pointer to the buffer. |
length | int | The number of elements to add to the list. |
Résultat | void |
public NativeList ( Allocator allocator ) : System | ||
allocator | Allocator | A member of the /// [Unity.Collections.Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html) enumeration. |
Résultat | System |
public NativeList ( int initialCapacity, Allocator allocator ) : System | ||
initialCapacity | int | The initial capacity of the list. If the list grows larger than its capacity, /// the internal array is copied to a new, larger array. |
allocator | Allocator | A member of the /// [Unity.Collections.Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html) enumeration. |
Résultat | System |
public this ( int index ) : T | ||
index | int | The zero-based index into the list. |
Résultat | T |