Documentation

Unity Engine


Unity Engine


IsEnabled(Entity)

Check whether an entire entity has the Disabled tag component.
Read time 1 minuteLast updated a day ago

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