baker-authoring-conversion

Convert designer-authored MonoBehaviour data into unmanaged ECS components during subscene import.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the need for slow, error-prone runtime conversion of designer-authored MonoBehaviour data by converting it into ECS components during subscene import.

Core Features & Use Cases

  • Designer-to-runtime conversion at bake time: Transforms inspector-configurable fields from authoring MonoBehaviours into unmanaged ECS components with zero runtime overhead.
  • Correct prefab entity reference wiring: Converts referenced prefab GameObjects into entity prefab references using GetEntity.
  • Deterministic and performant baking rules: Ensures conversions are done deterministically inside Bake() (no I/O, no runtime unit conversion), and uses the right TransformUsageFlags for moving vs static entities.

Use case example: You have an enemy authoring MonoBehaviour with a movement speed in degrees/sec and a projectile prefab reference; the skill pattern bakes a runtime EnemyMoveSpeed component with radians/sec and an EnemyProjectileRef entity reference for the prefab.

Quick Start

Create a MonoBehaviour authoring class with inspector fields and embed a nested Baker : Baker<YourAuthoring> that calls GetEntity(...) and uses AddComponent(...) to populate unmanaged ECS components during Bake().

Frequently Asked Questions about baker-authoring-conversion

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

FAQPage Schema
How do I convert MonoBehaviour data to ECS components at subscene import time?

To convert MonoBehaviour data to ECS components at subscene import time, create a nested Baker<TAuthoring> class and implement deterministic Bake() logic using GetEntity and AddComponent to populate unmanaged components. This removes runtime conversion overhead entirely.

How do I convert prefab GameObject references to ECS entity references during baking?

To convert prefab GameObject references to ECS entity references during baking, call GetEntity inside the Bake() method of your Baker class. This correctly wires the referenced prefab GameObjects into unmanaged entity prefab references for runtime use.

What are TransformUsageFlags in Unity DOTS baking?

TransformUsageFlags in Unity DOTS baking determine how an entity's transform is processed during conversion. You apply specific flags inside Bake() to distinguish between moving and static entities, ensuring deterministic and performant transform usage in ECS.

Does Unity DOTS support runtime conversion of authoring MonoBehaviours instead of baking?

Unity DOTS supports runtime conversion, but baking authoring MonoBehaviours at subscene import time is preferred. Baking eliminates slow, error-prone runtime overhead by deterministically converting inspector-configured parameters into unmanaged ECS components before runtime execution begins.

Why does my ECS baking logic produce non-deterministic results or errors?

ECS baking produces non-deterministic results if Bake() logic includes I/O operations or runtime unit conversions. Baking rules must be strictly deterministic, applying unit conversions like degrees to radians directly on inspector fields before adding them to unmanaged ECS components.