managed-component-bridge

Store managed Unity references on ECS entities using class-based IComponentData.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of coordinating ECS-driven logic with Unity’s managed world (GameObjects, MonoBehaviours, and Unity UI elements) when you must hold managed references on an entity.

Core Features & Use Cases

  • Managed reference boundary: Stores managed objects on ECS entities using class-based IComponentData to bridge hybrid initialization safely.
  • One-time initialization pattern: Recommends a self-disabling initialization system so the managed component exists only to set up the bridge once.
  • Performance and GC guardrails: Provides a GC cost model and concrete anti-patterns to avoid Burst access and hot-path usage.

Quick Start

Use managed-component-bridge when an ECS system needs to control a GameObject or Unity UI element during one-time hybrid initialization, and ensure your initialization system self-disables after wiring the references.

Frequently Asked Questions about managed-component-bridge

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

FAQPage Schema
How do I store GameObject and MonoBehaviour references on ECS entities in Unity?▼

Store GameObject and MonoBehaviour references on ECS entities using class-based IComponentData to bridge ECS logic with Unity managed objects during hybrid initialization, ensuring the initialization system self-disables after wiring references.

Can I access managed components from a Burst-compiled system in Unity ECS?▼

No, managed components require non-Burst access to prevent Burst safety violations, meaning you must isolate class-based IComponentData access outside of Burst-compiled systems to avoid runtime errors.

What is the best way to handle Unity UI objects during ECS hybrid initialization?▼

The best way to handle Unity UI objects during ECS hybrid initialization is storing them as managed references on entities via class-based IComponentData, using a self-disabling initialization system to prevent hot-path performance degradation.

Why does storing managed references on ECS entities cause GC pressure?▼

Storing managed references causes GC pressure because class-based IComponentData allocates on the managed heap, which is why this pattern is restricted to one-time setup and kept off hot paths to avoid performance issues.

When should I not use managed components in Unity ECS?▼

You should not use managed components in Unity ECS for hot-path logic or Burst-compiled systems, as class-based IComponentData introduces GC overhead and violates Burst safety constraints during frequent runtime updates.

Does managed-component-bridge work for continuous ECS updates or only one-time setup?▼

Managed-component-bridge works exclusively for one-time hybrid initialization setup, utilizing a self-disabling initialization system to ensure managed references do not persist into continuous ECS update loops and cause GC pressure.