Class DynamicBufferExtensions
- Namespace
- RisingV.Shared.Extensions
- Assembly
- RisingV.Shared.dll
Extensions for Unity's DynamicBuffer to convert it to a List.
public static class DynamicBufferExtensions
- Inheritance
-
DynamicBufferExtensions
- Inherited Members
Methods
ToList<T>(DynamicBuffer<T>)
Converts a DynamicBuffer to a List of the specified type.
public static List<T>? ToList<T>(this DynamicBuffer<T> bufferList) where T : new()
Parameters
bufferList
DynamicBuffer<T>The DynamicBuffer to convert.
Returns
- List<T>
A List of type T containing the elements from the DynamicBuffer, or null if the buffer is empty.
Type Parameters
T
The type of elements in the DynamicBuffer, must have a parameterless constructor.