Method Optional
Optional(NativeArray<T>, int)
Stores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference.
Declaration
public static RefRW<T> Optional(NativeArray<T> componentDataNativeArray, int index)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | componentDataNativeArray | The array of components. |
int | index | The index of the array. |
Returns
Type | Description |
---|---|
RefRW<T> | Read-write optional reference to component |