文档

Unity Engine

Download Unity

Unity Engine

RefRO<T>

ReadOnlyRef stores a safe read-only reference to a component data.
阅读时间1 分钟最后更新于 20 天前

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.