ecb-manual-immediate

Execute ECS structural changes immediately via inline EntityCommandBuffer playback.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the need to run structural Entity Component System (ECS) changes immediately within the same OnUpdate cycle rather than waiting for an ECBSystem boundary.

Core Features & Use Cases

  • Inline one-shot ECB playback: Record commands into a temporary EntityCommandBuffer and execute them immediately via ecb.Playback(state.EntityManager).
  • Same-system visibility: Ensure structural changes (instantiate/destroy/set component) are applied within the same update so downstream logic in the same system tick observes the results.
  • Safe one-shot initialization + cleanup: Support init systems that spawn entities and immediately dispose of the trigger entity to prevent reruns.

Quick Start

Ask the agent to update your one-shot ISystem so it creates a temporary EntityCommandBuffer, records your instantiate/set/destroy commands during iteration, and then calls ecb.Playback(state.EntityManager) before the update ends.

Frequently Asked Questions about ecb-manual-immediate

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

FAQPage Schema
How do I apply ECS structural changes immediately within the same OnUpdate cycle?

To apply ECS structural changes immediately within the same OnUpdate cycle, record commands into an inline EntityCommandBuffer and call ecb.Playback(state.EntityManager) before the update ends, ensuring results are instantly visible to downstream logic.

Why do my ECS entity changes only appear after the system update finishes?

Your ECS entity changes appear after the system update because standard EntityCommandBuffer playback waits for an ECBSystem boundary. Inline playback via ecb.Playback(state.EntityManager) forces immediate execution within the current OnUpdate.

What is the best way to handle one-shot entity initialization and cleanup in Unity DOTS?

The best way to handle one-shot entity initialization and cleanup in Unity DOTS is recording instantiate and destroy commands into a temporary EntityCommandBuffer, then playing them back immediately to dispose of trigger entities and prevent reruns.

Can I safely record structural changes while iterating over entities in Unity DOTS?

You must avoid structural changes during active iteration in Unity DOTS. Record commands into the EntityCommandBuffer during the iteration, then execute the structural changes safely by calling ecb.Playback(state.EntityManager) after the iteration completes.

Does inline EntityCommandBuffer playback require main-thread recording in Unity DOTS?

Inline EntityCommandBuffer playback requires main-thread recording in Unity DOTS. You must record your commands on the main thread and execute them via ecb.Playback(state.EntityManager) to ensure safe structural changes within the same system update.