文档

Unity Engine

Unity Engine

GetTransformRef(Entity, bool)

Gets the TransformRef of an entity.
阅读时间1 分钟最后更新于 5 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public TransformRef GetTransformRef(Entity entity, bool isReadOnly)

Parameters

entity

The entity.

isReadOnly

True for read-only access, or false for read/write access.

Returns

Type

Description

TransformRefThe TransformRef to the entity.

Remarks

Using this method registers a read-only or read/write dependency for the system on TransformRef, based on the value passed to
isReadOnly
. For a GameObject entity, the system's jobs also wait for, and are waited for by, native code that accesses GameObject transforms.