文档

Unity Engine

Download Unity

Unity Engine

Build

Create an EntityQuery owned by an ISystem 's SystemState.
阅读时间1 分钟最后更新于 19 天前

Definition

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

Build(SystemState)

Create an EntityQuery owned by an ISystem's SystemState.
public EntityQuery Build(ref SystemState systemState)

Parameters

systemState

SystemState of the system that will own the EntityQuery.

Returns

Type

Description

EntityQueryAn EntityQuery based on the constraints set in the EntityQueryBuilder

Remarks

The System owning the systemState object retains this EntityQuery and disposes it at the end of the System's lifespan.

Build(SystemBase)

Create an EntityQuery owned by an SystemBase.
[ExcludeFromBurstCompatTesting("SystemBase is a managed class")]public EntityQuery Build(SystemBase systemBase)

Parameters

systemBase

System that will own the EntityQuery.

Returns

Type

Description

EntityQueryAn EntityQuery based on the constraints set in the EntityQueryBuilder

Remarks

The SystemBase argument retains the EntityQuery, and disposes it at the end of that system's lifetime.

Build(EntityManager)

Create an EntityQuery owned by an EntityManager.
public EntityQuery Build(EntityManager entityManager)

Parameters

entityManager

EntityManager that will own the EntityQuery.

Returns

Type

Description

EntityQueryAn EntityQuery based on the constraints set in the EntityQueryBuilder.

Remarks

The EntityManager retains the EntityQuery, and disposes it at the end of that EntityManager's corresponding World's lifetime.