wave6-is-component-enabled-check

Check an ECS component's enabled state via EntityManager.IsComponentEnabled on the main thread.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave6-is-component-enabled-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wave6-is-component-enabled-check
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/.claude/skills/unity-dots/wave6-is-component-enabled-check
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill wave6-is-component-enabled-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the need to reliably read whether a specific enabled/disabled ECS component is currently active so you can make correct main-thread decisions before enabling or disabling anything.

Core Features & Use Cases

  • Imperative main-thread enabled-state checks: Use EntityManager.IsComponentEnabled<T>(entity) to branch logic based on the component’s enabled bit.
  • Single-entity enable/disable workflows: Commonly paired with SetComponentEnabled<T>(entity, bool) for targeted behavior changes.
  • Correctness vs. structural presence: Distinguishes enabled-bit state (IsComponentEnabled) from structural presence (HasComponent), avoiding silent logic bugs.

Quick Start

Use state.EntityManager.IsComponentEnabled<Carry>(playerEntity) in your main-thread update to decide whether to run the drop branch or search for a candidate entity to enable.

Frequently Asked Questions about wave6-is-component-enabled-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if an ECS component is enabled on the main thread in Unity DOTS?

To check an ECS component enabled state on the main thread, use EntityManager.IsComponentEnabled<T>(entity) to read the enabled bit and branch logic for imperative decisions like state machines or pickup workflows.

What is the difference between IsComponentEnabled and HasComponent in Unity ECS?

IsComponentEnabled checks the enabled bit of an IEnableableComponent, while HasComponent only checks structural presence. Using HasComponent instead of checking the enabled state can cause silent logic bugs in conditional workflows.

Can I use EntityManager.IsComponentEnabled inside a Unity DOTS job or parallel context?

No, EntityManager.IsComponentEnabled is restricted to the main thread. For job or parallel contexts, you should avoid this approach in favor of using EnabledRefRO<T> and query filters to read component state.

How do I toggle an enableable component state for a specific entity in Unity DOTS?

You can toggle an enableable component state by pairing EntityManager.IsComponentEnabled<T> to read the current bit, then using SetComponentEnabled<T>(entity, bool) on the main thread to enable or disable the targeted behavior.

When do I need to check enabled state on ECS components instead of structural presence?

You need to check enabled state when making imperative main-thread decisions such as pickup and drop logic, conditional enable/disable sequences, or state machines where the active behavior depends on the component bit rather than structural existence.