文档

Unity Engine

Download Unity

Unity Engine

IsEnabled(Entity)

Check whether an entire entity has the Disabled tag component.
阅读时间1 分钟最后更新于 19 天前

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public bool IsEnabled(Entity entity)

Parameters

entity

The entity to check

Returns

Type

Description

boolTrue if the target entity does not have Disabled tag component, or false if it does.

Remarks

Entities with the Disabled component are not matched by any EntityQuery, and are therefore not processed by systems. To override this behavior for a specific query, use EntityQueryOptions.IncludeDisabledEntities at query creation time.
Additional Resources: EntityManager.SetEnabled