enableable-component

Community

Toggle ECS activity without breaking archetypes

AuthordyCuong03
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It solves the need to pause and resume an entity’s behavior in Unity DOTS without paying the cost and complexity of structural archetype changes.

Core Features & Use Cases

  • Enable/Disable components efficiently: Toggle an IEnableableComponent while preserving its data, avoiding AddComponent/RemoveComponent churn.
  • Correct querying of enabled vs disabled entities: Use query filters like enabled-only, disabled-only, present, and IgnoreComponentEnabledState when you must see both.
  • Job-safe activation control: Update enabled state in parallel using EnabledRefRW<T>/EnabledRefRO<T> or EntityCommandBuffer.SetComponentEnabled<T> as appropriate.

Example use case: frequently switching “Sleeping vs Awake” behavior for thousands of agents each frame without migrating archetypes.

Quick Start

Ask your AI to implement IEnableableComponent for your state (e.g., Sleeping), then toggle it via EnabledRefRW<T> in a system query that ignores enable-state when you need to process both enabled and disabled entities.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: enableable-component
Download link: https://github.com/dyCuong03/unity-agent-team/archive/main.zip#enableable-component

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.