Documentation

Unity Engine


Unity Engine


RefRO<T>

ReadOnlyRef stores a safe read-only reference to a component data.
Read time 1 minuteLast updated 2 days ago

Definition

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

IsValidProperty that returns true if the reference is valid, false otherwise.
ValueROReturns a read-only reference to the component value itself.

Static Methods

Method

Description

OptionalStores a safe reference to a component from an array of components at the index. If the array is empty stores a null reference.