Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

FixedList4096Bytes<T0>

struct in Unity.Collections


Implements interfaces:IIndexable<T0>, INativeList<T0>

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

An unmanaged, resizable list whose content is all stored directly in the 4096-byte struct. Useful for small lists.

Properties

Property Description
Capacity The number of elements that can fit in this list.
IsEmpty Whether this list is empty.
Length The current number of items in this list.
this[int] The element at a given index.

Constructors

Constructor Description
FixedList4096Bytes_1 Initializes and returns an instance of FixedList4096Bytes with content copied from another list.

Public 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 Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements.
AddRangeNoResize Appends elements from a buffer to the end of this list. Increments the length by the number of appended elements.
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 this list and another list are equal.
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
FixedList4096Bytes<T> Returns a new list that is a copy of another list.
FixedList4096Bytes<T> Returns a new list that is a copy of another list.
FixedList4096Bytes<T> Returns a new list that is a copy of another list.
FixedList4096Bytes<T> Returns a new list that is a copy of another list.
operator != Returns true if two lists are unequal.
operator == Returns true if two lists are equal.
ReadOnlySpan<T> Implicit cast to ReadOnlySpan<T>.
Span<T> Implicit cast to Span<T>.