Class NativeListExt
Provides Extension methods for the NativeList class
Inherited Members
Namespace: Unity.Networking.Transport.Utilities
Assembly: Unity.Networking.Transport.dll
Syntax
public static class NativeListExt
Methods
ResizeUninitializedTillPowerOf2<T>(NativeList<T>, int)
This function will make sure that sizeToFit can fit into list. If sizeToFit >= list's Length then list will be ResizeUninitialized to a new length. New Length will be the next highest power of 2 of sizeToFit
Declaration
public static void ResizeUninitializedTillPowerOf2<T>(this NativeList<T> list, int sizeToFit) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeList<T> | list | List that should be resized if sizeToFit >= its size |
int | sizeToFit | Requested size that should fit into list |
Type Parameters
Name | Description |
---|---|
T |