dots-enableable-components

Guide Unity DOTS IEnableableComponent usage for frequent entity state toggling in Burst jobs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid expensive structural changes in Unity DOTS by choosing IEnableableComponent when you need to toggle entity state frequently, so your systems stay fast and predictable.

Core Features & Use Cases

  • Enable/disable without archetype moves: Use IEnableableComponent to flip an enabled bit instead of adding/removing components to prevent chunk shuffling and copying.
  • Correct query semantics: Understand how default queries skip disabled components and how IgnoreComponentEnabledState changes what your systems iterate.
  • Safe job toggling: Use EnabledRefRW/EnabledRefRO for direct job writes or ECB.SetComponentEnabled when enabling entities outside the current query.

Quick Start

Use dots-enableable-components when designing a hot-path boolean state that flips often (cooldowns, dirty/dead-alive flags, paused/active tags) and you want to toggle it safely in Burst jobs without structural churn.

Frequently Asked Questions about dots-enableable-components

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

FAQPage Schema
How do I toggle entity state in Unity DOTS without causing structural changes?

To toggle entity state in Unity DOTS without structural changes, use IEnableableComponent to flip an enabled bit instead of adding or removing components, which prevents chunk shuffling and copying overhead.

What is the difference between IEnableableComponent and adding/removing components in ECS?

IEnableableComponent flips an enabled bit to toggle state without archetype moves, whereas adding or removing components triggers structural changes that force chunk shuffling and data copying, hurting performance.

How do I safely toggle enableable components inside Burst jobs?

To safely toggle enableable components inside Burst jobs, use EnabledRefRW for direct writes within the current query, or use ECB.SetComponentEnabled when enabling entities outside the current query in parallel jobs.

Why does my Unity DOTS query skip entities with disabled components?

Default Unity DOTS queries skip disabled components because they filter by the enabled bit. You must use IgnoreComponentEnabledState query option if your systems need to iterate over entities regardless of their enabled state.

When should I use enableable components for entity state in Unity ECS?

Use enableable components in Unity ECS for high-frequency boolean state toggling like cooldowns, dirty flags, alive/dead state, and paused/active tags, ensuring fast and predictable system performance without structural churn.

Can I use ECB to enable components on entities outside my current system query?

Yes, you can use ECB.SetComponentEnabled to safely enable or disable components on entities outside your current query, which is necessary for safe state mutation when running parallel jobs in Unity DOTS.