FixedList128Bytes<T>
An unmanaged, resizable list whose content is all stored directly in the 128-byte struct. Useful for small lists.
Read time 3 minutesLast updated 6 days ago
Definition
- Type: Struct
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
- Implements: INativeList<T>, IIndexable<T>, IEnumerable<T>, IEnumerable, IEquatable<FixedList32Bytes<T>>, IComparable<FixedList32Bytes<T>>, IEquatable<FixedList64Bytes<T>>, IComparable<FixedList64Bytes<T>>, IEquatable<FixedList128Bytes<T>>, IComparable<FixedList128Bytes<T>>, IEquatable<FixedList512Bytes<T>>, IComparable<FixedList512Bytes<T>>, IEquatable<FixedList4096Bytes<T>>, IComparable<FixedList4096Bytes<T>>
public struct FixedList128Bytes<T> : INativeList<T>, IIndexable<T>, IEnumerable<T>, IEnumerable, IEquatable<FixedList32Bytes<T>>, IComparable<FixedList32Bytes<T>>, IEquatable<FixedList64Bytes<T>>, IComparable<FixedList64Bytes<T>>, IEquatable<FixedList128Bytes<T>>, IComparable<FixedList128Bytes<T>>, IEquatable<FixedList512Bytes<T>>, IComparable<FixedList512Bytes<T>>, IEquatable<FixedList4096Bytes<T>>, IComparable<FixedList4096Bytes<T>> where T : unmanaged
Constructors
Constructor | Description |
|---|---|
| FixedList128Bytes`1(Unity.Collections.FixedList32Bytes{`0}@) | Initializes and returns an instance of FixedList128Bytes with content copied from another list. |
| FixedList128Bytes`1(Unity.Collections.FixedList4096Bytes{`0}@) | Initializes and returns an instance of FixedList128Bytes with content copied from another list. |
| FixedList128Bytes`1(Unity.Collections.FixedList512Bytes{`0}@) | Initializes and returns an instance of FixedList128Bytes with content copied from another list. |
| FixedList128Bytes`1(Unity.Collections.FixedList64Bytes{`0}@) | Initializes and returns an instance of FixedList128Bytes with content copied from another list. |
Properties
Property | Description |
|---|---|
| Capacity | The number of elements that can fit in this list. |
| IsEmpty | Whether this list is empty. |
| this[] | The element at a given index. |
| Length | The current number of items in this list. |
Methods
Method | Description |
|---|---|
| Add | Appends an element to the end of this list. Increments the length by 1. |
| AddNoResize | Appends an element to the end of this list. Increments the length by 1. |
| AddRange | Copies elements from a ReadOnlySpan to the end of this list. |
| AddRangeNoResize | Copies elements from a ReadOnlySpan to the end of this list. |
| AddReplicate | Appends value count times to the end of this list. |
| AsReadOnlySpan | Returns ReadOnlySpan\<T\> view of this container. |
| AsSpan | Returns Span\<T\> view of this container. |
| Clear | Sets the length to 0. |
| CompareTo | Returns a number denoting whether this list should be placed before or after another list in a sort. |
| ElementAt | Returns the element at a given index. |
| Equals | Returns true if the list is equal to an object. |
| GetEnumerator | Returns an enumerator for iterating over the elements of this list. |
| GetHashCode | Returns the hash code of this list. |
| GetUnsafePtr | Get a pointer to the data. |
| GetUnsafeReadOnlyPtr | Get a pointer to the data. |
| Insert | Inserts a single element at an index. Increments the length by 1. |
| InsertRange | Shifts elements toward the end of this list, increasing its length. |
| InsertRangeWithBeginEnd | Shifts elements toward the end of this list, increasing its length. |
| RemoveAt | Removes the element at an index. Shifts everything above the index down by one and decrements the length by 1. |
| RemoveAtSwapBack | Copies the last element of this list to an index. Decrements the length by 1. |
| RemoveRange | Removes "N" elements of a range. Shifts everything above the range down by "N" and decrements the length by "N". |
| RemoveRangeSwapBack | Copies the last "N" elements of this list to a range in this list. Decrements the length by "N". |
| ToArray | Returns a managed array that is a copy of this list. |
| ToNativeArray | Returns an array that is a copy of this list. |
Operators
Operator | Description |
|---|---|
| operator == | Returns true if two lists are equal. |
| operator != | Returns true if two lists are unequal. |
Structs
Struct | Description |
|---|---|
| FixedList128Bytes<T>.Enumerator | An enumerator over the elements of a FixedList128Bytes\<T\>. |