文档

Unity Engine

Unity Engine

GetTransformLookup

Manually gets a TransformLookup object that can access a TransformRef.
阅读时间1 分钟最后更新于 5 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

GetTransformLookup(bool)

Manually gets a TransformLookup object that can access a TransformRef.
public TransformLookup GetTransformLookup(bool isReadOnly = false)

Parameters

isReadOnly

Whether the transform data is only read or is also written. Access data in a read-only fashion whenever possible.

Returns

Type

Description

TransformLookupAn array-like object that provides access to transform data, indexed by Entity.

Remarks

Remember to call TransformLookup.Update.
Assign the returned object to a field of your Job struct so that you can access the contents of the transform in a Job. The lookup can access GameObject entities.
Additional Resources: ComponentLookup<T>

GetTransformLookup(bool, bool)

Manually gets a TransformLookup object that can access a TransformRef, optionally excluding the transforms of GameObject entities.
public TransformLookup GetTransformLookup(bool isReadOnly, bool excludeGameObjects)

Parameters

isReadOnly

Whether the transform data is only read or is also written.

excludeGameObjects

Whether the lookup cannot access GameObject entities. Jobs using an excluding lookup do not wait for, and are not waited for by, native code that accesses GameObject transforms.

Returns

Type

Description

TransformLookupAn array-like object that provides access to transform data, indexed by Entity.

Remarks

Remember to call TransformLookup.Update.