dots-hybrid-bridge

Enforce DOTS-writes/Unity-reads ownership in hybrid Unity projects.

6|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/dyCuong03/unity-agent-team --skill dots-hybrid-bridge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dots-hybrid-bridge
Source: https://github.com/dyCuong03/unity-agent-team/tree/main/workspace/dots-program/scratch/wave-2-orchestrator-drafts/dots-hybrid-bridge
Command: npx skills add https://github.com/dyCuong03/unity-agent-team --skill dots-hybrid-bridge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents hybrid Unity/DOTS projects from drifting into dual-ownership bugs by clearly enforcing that DOTS owns runtime truth while Unity only reads it for presentation and input-driven requests.

Core Features & Use Cases

  • Unity asset references in ECS components: Use UnityObjectRef<T> inside IComponentData for Mesh, Material, AudioClip, and ScriptableObject references.
  • Correct hybrid read/write boundaries: Establish when Unity must read entity state (HUD/minimap/presentation) versus when Unity must trigger ECS work via request entities.
  • Authoring/baking and SubScene safety: Use Bakers for bridge setup and follow SubScene boundary rules to avoid rebake wiping and serialization/domain-reload issues.

Quick Start

Ask an AI to review your current hybrid setup and refactor it to a DOTS-owned one-way bridge using UnityObjectRef<T>, request entities for Unity→DOTS triggers, and main-thread deref for any Unity reads.

Frequently Asked Questions about dots-hybrid-bridge

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

FAQPage Schema
How do I synchronize Unity MonoBehaviour state with DOTS ECS without causing dual-ownership bugs?

Establish a one-way bridge where DOTS owns runtime truth and Unity only reads it for presentation. This prevents dual-ownership bugs by restricting Unity to triggering ECS work via request entities instead of writing state directly.

What is the correct way to use UnityObjectRef inside ECS components for hybrid setups?

Use `UnityObjectRef<T>` inside `IComponentData` to hold references to Mesh, Material, AudioClip, or ScriptableObject assets. Unity must dereference these on the main thread to follow safe hybrid read/write boundaries.

How do I trigger DOTS ECS systems from Unity MonoBehaviour input or UI events?

Trigger DOTS systems from Unity by using a request-entity pattern where MonoBehaviour input and UI events create request entities. This maintains the DOTS-writes and Unity-reads ownership rule by communicating intent through entities.

How do I set up Unity asset references in SubScenes without baking wiping them out?

Use Bakers for bridge setup and follow SubScene boundary rules to avoid rebake wiping and serialization or domain-reload issues. This ensures authoring-time asset wiring remains stable when using `UnityObjectRef<T>` in components.

When should Unity read DOTS entity state directly in a hybrid project?

Unity should read DOTS entity state directly on the main thread for presentation purposes like HUD, minimap readouts, or UI displays. This keeps Unity strictly in a read-only role to maintain the one-way synchronization bridge.