dots-event-driven-ecs

Model one-frame ECS events as request entities, command components, or event buffers.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill dots-event-driven-ecs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dots-event-driven-ecs
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/workspace/dots-program/scratch/wave-2-orchestrator-drafts/dots-event-driven-ecs
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill dots-event-driven-ecs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents hard-to-debug ECS gameplay issues caused by treating one-frame events as unmanaged or persistent state, ensuring events are consumed exactly once and cleared reliably.

Core Features & Use Cases

  • Explicit one-shot event modeling: Choose the correct event shape (request entity, enableable command component, or event buffer) based on lifetime and broadcast needs.
  • Deterministic producer/consumer ownership: Enforce exactly-one consumer semantics (or an explicit broadcast contract) to avoid double-application and missed consumption.
  • Burst-safe, replay-safe anti-pattern guidance: Reject managed-world event patterns (C# events, UnityEvent, static buses) and highlight failure modes like wrong ECB phase ordering and un-destroyed request entities.

Quick Start

Ask the agent to refactor your ECS gameplay flow so every one-frame UI/input/network trigger becomes a request entity, an enableable command component, or an event buffer with a clearly defined single consumer and a guaranteed clearing/destroy step.

Frequently Asked Questions about dots-event-driven-ecs

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

FAQPage Schema
How do I handle one-frame events in Unity DOTS ECS without leaking persistent state?

To handle one-frame events in Unity DOTS ECS safely, model them as explicit data using request entities via ECB, enableable command components, or event buffers with deterministic lifetime and late-phase cleanup to prevent persistent state leaks.

What is the best way to model external input and network requests in Unity ECS?

The best way to model external input and network requests in Unity ECS is using request entities or enableable command components, ensuring deterministic producer/consumer ownership and exactly-one consumption without structural changes.

Why do my ECS event buffers cause double-application or missed consumption in Burst?

ECS event buffers cause double-application or missed consumption in Burst when using managed-world patterns like C# events or static buses, or when ECB phase ordering is wrong and request entities are not destroyed properly.

How do I refactor an ECS gameplay flow to use the command pattern with enableable components?

Refactor an ECS gameplay flow by converting every one-frame UI or input trigger into an enableable command component or request entity, defining a clear single consumer and a guaranteed clearing or destroy step to satisfy Entities 1.x requirements.

When should I not use managed event buses for Unity DOTS gameplay triggers?

You should not use managed event buses for Unity DOTS gameplay triggers when you need Burst-safe, replay-safe execution, as they bypass deterministic lifetime management, cause dual ownership issues, and prevent reliable clearing and destroy verification.