wave7-companion-go-lifecycle

Manage ECS-to-GameObject lifecycle with marker, spawn, sync, and destroy phases.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the lifecycle mismatch problem between ECS entity existence and the creation, transform synchronization, and destruction of paired Unity GameObjects.

Core Features & Use Cases

  • Four-phase lifecycle pattern: Implements Marker → Spawn → Sync → Destroy using ECS components to control exactly when a companion GameObject should exist.
  • Correct main-thread boundaries: Ensures companion GameObject instantiation and destruction happen in appropriate system groups while keeping ECS as the source of truth.
  • Safe cleanup semantics: Prevents GO leaks when entities are destroyed by using lifecycle-safe destroy handling and null-guarding UnityObjectRef values.
  • Use case: Create an audio/VFX/UI companion GameObject for an ECS entity when Entities Graphics alone cannot render the required presentation.

Quick Start

Tell your AI to provide the ECS marker component, spawn system, GO-to-entity reference component, and destroy system that follow the marker/spawn/sync/destroy pattern with correct system group placement.

Frequently Asked Questions about wave7-companion-go-lifecycle

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

FAQPage Schema
How do I sync companion GameObjects to ECS entities in Unity DOTS?

You sync companion GameObjects to ECS entities by implementing a four-phase lifecycle pattern: Marker, Spawn, Sync, and Destroy. This ensures deterministic main-thread creation and destruction while keeping ECS as the source of truth.

Why do my companion GameObjects leak when entities are destroyed in Unity ECS?

Companion GameObjects leak when entity destruction lacks safe cleanup semantics. You must use lifecycle-safe destroy handling and null-guard UnityObjectRef values to prevent orphaned GameObjects when entities are removed.

What's the best way to handle hybrid rendering for VFX and audio in Unity DOTS?

The best way to handle hybrid rendering for VFX and audio is using companion GameObjects paired with ECS entities. This bypasses Entities Graphics limitations by synchronizing transforms in the PresentationSystemGroup.

How do I prevent transform ordering bugs between ECS entities and GameObjects?

You prevent transform ordering bugs by placing transform synchronization in the PresentationSystemGroup. This enforces correct main-thread boundaries and keeps GameObject presentation strictly aligned with ECS state.

When do I need companion GameObjects for ECS entities instead of Entities Graphics?

You need companion GameObjects when presentation requirements like VFX, audio, or UI elements are not supported by Entities Graphics. Pairing them with ECS entities allows hybrid presentation while maintaining deterministic lifecycle control.