wave7-add-component-object-hybrid-attach

Attach managed UnityEngine.Object instances to ECS entities via AddComponentObject.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you attach managed Unity objects (like MonoBehaviours, ScriptableObjects, or any UnityEngine.Object) to ECS entities so you can access and drive hybrid functionality from ECS code.

Core Features & Use Cases

  • Runtime and bake-time hybrid attachment: Links a companion UnityEngine.Object to an entity using AddComponentObject, either during authoring/baking or during play-mode initialization.
  • Main-thread-safe usage guidance: Explains the constraints of managed access (main-thread only) and what not to do (e.g., inside jobs or Burst systems).
  • Practical performance and reliability recommendations: Covers GC/thrashing tradeoffs, null/destroy risks, and how to prefer blittable ECS mirrors for high-frequency updates.

Quick Start

Tell the assistant to “show me the safest way to bake an Animator reference into a hybrid ECS entity using AddComponentObject, and how to drive it from a non-Burst PresentationSystemGroup system.”

Frequently Asked Questions about wave7-add-component-object-hybrid-attach

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

FAQPage Schema
How do I attach a MonoBehaviour to an ECS entity using AddComponentObject?

To attach a MonoBehaviour to an ECS entity, use AddComponentObject to link the managed UnityEngine.Object instance during baking or at runtime. This enables hybrid access to companion components like Animator or AudioSource directly from ECS code on the main thread.

Can I access managed Unity objects from inside a Burst job in Unity DOTS?

No, you cannot access managed Unity objects inside Burst jobs. AddComponentObject requires main-thread-only consumption patterns, meaning you must drive managed references from non-Burst systems to avoid runtime errors and managed reference invalidation.

What are the limitations of using AddComponentObject for hybrid ECS workflows?

Limitations of AddComponentObject include main-thread-only access restrictions, potential GC thrashing tradeoffs, and null or destroy risks. You must implement guardrails against structural-change sync points and prefer blittable ECS mirrors for high-frequency updates.

When should I use managed components instead of blittable ECS data?

Use managed components via AddComponentObject for per-entity interaction with GameObject-backed components like Animator or AudioSource when you need hybrid access. Prefer blittable ECS mirrors for high-frequency updates to avoid garbage collection overhead and maintain performance.