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.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
public static RefRW<T> Optional(NativeArray<T> componentDataNativeArray, int index)
Parameters
Returns
Type | Description |
|---|---|
| RefRW<T> | Read-write optional reference to component |