RefRO<T>
ReadOnlyRef stores a safe read-only reference to a component data.
Read time 1 minuteLast updated 2 days ago
Definition
- Type: Struct
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
- Implements: IQueryTypeParameter
public readonly struct RefRO<T> : IQueryTypeParameter where T : struct, IComponentData
Constructors
Constructor | Description |
|---|---|
| RefRO`1(Unity.Collections.NativeArray{`0},System.Int32) | Stores a safe reference to a component from an array of components at the index. |
Properties
Property | Description |
|---|---|
| IsValid | Property that returns true if the reference is valid, false otherwise. |
| ValueRO | Returns a read-only reference to the component value itself. |
Static Methods
Method | Description |
|---|---|
| Optional | Stores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference. |