文档

Unity Engine

Download Unity

Unity Engine

implicit operator T

Implicitly converts a UnityObjectRef to the UnityEngine.Object it references.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Operator
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.CoreModule

implicit operator T(UnityObjectRef<T>)

Implicitly converts a UnityObjectRef to the UnityEngine.Object it references.
public static implicit operator T(UnityObjectRef<T> unityObjectRef)

Parameters

unityObjectRef

Reference used to access the Object.

Returns

Type

Description

TThe instance of type T referenced by unityObjectRef.

implicit operator bool(Boolea)

Checks whether the reference points to a valid object.
public static implicit operator bool(UnityObjectRef<T> obj)

Parameters

The reference to check.

Returns

Type

Description

boolTrue if the referenced object's EntityId is valid.