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 RefRO<T> Optional(NativeArray<T> componentDataArray, int index)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<T> | componentDataArray | The NativeArray of components. |
int | index | The index of the components. |
Returns
Type | Description |
---|---|
RefRO<T> | Read-only optional reference to component |