Struct FixedList4096Bytes<T>
An unmanaged, resizable list whose content is all stored directly in the 4096-byte struct. Useful for small lists.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
[Serializable]
public struct FixedList4096Bytes<T> : INativeList<T>, IIndexable<T> where T : unmanaged
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Constructors
Name | Description |
---|---|
Fixed |
Initializes and returns an instance of FixedList4096Bytes with content copied from another list. |
Fixed |
Initializes and returns an instance of FixedList4096Bytes with content copied from another list. |
Fixed |
Initializes and returns an instance of FixedList4096Bytes with content copied from another list. |
Fixed |
Initializes and returns an instance of FixedList4096Bytes with content copied from another list. |
Properties
Name | Description |
---|---|
Capacity | The number of elements that can fit in this list. |
Is |
Whether this list is empty. |
this[int] | The element at a given index. |
Length | The current number of items in this list. |
Methods
Name | Description |
---|---|
Add(in T) | Appends an element to the end of this list. Increments the length by 1. |
Add |
Appends an element to the end of this list. Increments the length by 1. |
Add |
Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements. |
Add |
Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements. |
Add |
Appends value count times to the end of this list. |
Clear() | Sets the length to 0. |
Compare |
Returns a number denoting whether this list should be placed before or after another list in a sort. |
Compare |
Returns a number denoting whether this list should be placed before or after another list in a sort. |
Compare |
Returns a number denoting whether this list should be placed before or after another list in a sort. |
Compare |
Returns a number denoting whether this list should be placed before or after another list in a sort. |
Compare |
Returns a number denoting whether this list should be placed before or after another list in a sort. |
Element |
Returns the element at a given index. |
Equals(object) | Returns true if the list is equal to an object. |
Equals(Fixed |
Returns true if this list and another list are equal. |
Equals(Fixed |
Returns true if this list and another list are equal. |
Equals(Fixed |
Returns true if this list and another list are equal. |
Equals(Fixed |
Returns true if this list and another list are equal. |
Equals(Fixed |
Returns true if this list and another list are equal. |
Get |
Returns an enumerator for iterating over the elements of this list. |
Get |
Returns the hash code of this list. |
Insert(int, in T) | Inserts a single element at an index. Increments the length by 1. |
Insert |
Shifts elements toward the end of this list, increasing its length. |
Insert |
Shifts elements toward the end of this list, increasing its length. |
Remove |
Removes the element at an index. Shifts everything above the index down by one and decrements the length by 1. |
Remove |
Copies the last element of this list to an index. Decrements the length by 1. |
Remove |
Removes N elements of a range. Shifts everything above the range down by N and decrements the length by N. |
Remove |
Copies the last N elements of this list to a range in this list. Decrements the length by N. |
To |
Returns a managed array that is a copy of this list. |
To |
Returns an array that is a copy of this list. |