tag-component

Create empty IComponentData tags for Unity DOTS entity state filtering.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of labeling entities with logical state so systems can include or exclude them efficiently without adding storage or per-entity data fields.

Core Features & Use Cases

  • Empty tag component: Defines an IComponentData struct with no fields to represent membership or a boolean-like state.
  • Safe, query-driven gating: Uses RequireForUpdate<T>() to conditionally run systems and query filters like WithAll<T>() / WithNone<T>() to select entities based on tag presence.
  • Zero-chunk-overhead intent: Achieves stateful dispatch by structural archetype membership rather than runtime checks, enabling clear system composition.

What problem does it solve?

This Skill solves the challenge of labeling entities with logical state so systems can include or exclude them efficiently without adding storage or per-entity data fields.

Quick Start

Ask the AI to show how to create an empty IComponentData tag (e.g., IsActiveEnemy), gate a system with state.RequireForUpdate<IsActiveEnemy>(), and filter entities with Query().WithAll<IsActiveEnemy>() while adding/removing the tag via an ECB outside iteration.

Frequently Asked Questions about tag-component

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

FAQPage Schema
How do I use tag components in Unity DOTS to filter entities without adding data fields?

Tag components in Unity DOTS are empty IComponentData structs that label entities with a logical state, allowing archetype-based query filtering without adding storage or per-entity data fields.

How do I gate a system in Unity ECS based on entity tag presence?

You can gate a Unity ECS system by calling state.RequireForUpdate<T>() with your tag component, which conditionally runs the system only if entities matching the query with that tag currently exist.

What is the best way to add or remove structural tags from entities during iteration in Unity DOTS?

To safely add or remove structural tags from entities in Unity DOTS, use an EntityCommandBuffer (ECB) outside of the iteration loop to queue structural changes and prevent archetype modification conflicts.

When should I use ECS tag components instead of boolean fields for entity state?

Use ECS tag components instead of boolean fields when representing infrequent state changes like feature flags or scene activation, leveraging zero-chunk-overhead archetype membership for efficient query-level inclusion and exclusion.

Can I use query filters like WithAll and WithNone with empty tag components in Unity DOTS?

Yes, you can use query filters like WithAll<T>() and WithNone<T>() with empty tag components in Unity DOTS to select or exclude entities based purely on their structural archetype membership.

Does Unity DOTS support zero-data dispatch routing using archetype structural changes?

Yes, Unity DOTS supports zero-data dispatch routing by using structural archetype membership through tag components, enabling clear system composition and stateful dispatch without runtime boolean checks.