wave5-parent-child-hierarchy-dynamic

Reparent Unity DOTS entities dynamically using Entity Command Buffers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Runtime parent/child hierarchy changes in Unity DOTS can break transform propagation or corrupt buffer iteration when structural changes occur while iterating over DynamicBuffer<Child>.

Core Features & Use Cases

  • Runtime attach/detach via ECB: Uses an Entity Command Buffer to reparent safely without invalidating iteration.
  • Correct DynamicBuffer<Child> handling: Provides safe iteration patterns and batch operations to detach or adjust many children efficiently.
  • Transform propagation correctness: Ensures required components (like LocalTransform) exist so hierarchy world-space results aren’t silently skipped.
  • Use Case: Implement weapon pickup (mount/dismount child entities), vehicle mounting (reparent character parts), or runtime character part assembly (bulk attach/detach).

Quick Start

In your system, reparent children by iterating the parent’s DynamicBuffer<Child> and issuing detach/attach structural changes through an ECB, ensuring each attached child has a LocalTransform.

Frequently Asked Questions about wave5-parent-child-hierarchy-dynamic

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

FAQPage Schema
How do I safely reparent entities in Unity DOTS without breaking transform propagation?

To safely reparent entities in Unity DOTS, use an Entity Command Buffer to update Parent components during structural changes, ensuring children have LocalTransform components so hierarchy world-space results aren't skipped.

Why does iterating over DynamicBuffer<Child> corrupt when changing parent hierarchies at runtime?

Runtime hierarchy changes corrupt DynamicBuffer<Child> iteration because direct structural changes invalidate the buffer while it is being read, requiring ECB-based deferred structural changes to modify parents safely.

How do I implement weapon pickup and vehicle mounting by attaching child entities in Unity DOTS?

Implement weapon pickup and vehicle mounting by iterating the parent's DynamicBuffer<Child> and issuing attach or detach structural changes through an ECB, ensuring each attached child has a LocalTransform component.

What's the best way to handle batch hierarchy changes for multiple children in Unity DOTS?

The best way to handle batch hierarchy changes for multiple children is using safe iteration patterns with an Entity Command Buffer to detach or adjust many children efficiently without invalidating the DynamicBuffer<Child>.

Do I need LocalTransform on every attached child for Unity DOTS hierarchy reparenting to work?

Yes, you need LocalTransform on every attached child for Unity DOTS hierarchy reparenting, because missing this component causes hierarchy world-space transform propagation results to be silently skipped.

When should I not modify Child buffers directly during Unity DOTS entity reparenting?

You should not modify Child buffers directly during entity reparenting when iterating, because consistent ownership requires Child buffers to be modified only by the owning system using deferred ECB structural changes.