unity-yaml-editing

Guides safe hand-editing of Unity serialized YAML when REST APIs cannot reach.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-yaml-editing-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-yaml-editing
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/yaml-editing
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-yaml-editing-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When Unity scripts fail to compile, .meta GUIDs break, or merge conflicts corrupt .unity and .prefab files, the Editor and REST APIs become unavailable, leaving direct YAML text editing as the only recovery path. This Skill provides the rules to perform those edits without corrupting serialization. ## Core Features & Use Cases - Reference and fileID Repair: Fix broken m_Script GUID references and missing components by updating the correct guid while preserving fileID 11500000 and type 3. - .meta and GUID Safety: Detect pseudo-random GUIDs, regenerate them with uuid4, and update every referencing file in the same change. - ProjectSettings and Merge Conflicts: Patch hidden ProjectSettings fields and resolve per-block conflicts in .unity and .prefab files. - Use Case: A renamed script leaves a prefab with a missing component. Read the script's current GUID from its .cs.meta, update the m_Script guid in the prefab YAML, then reimport to validate. ## Quick Start Ask the assistant to repair the broken m_Script GUID reference in a prefab file by reading the script's .meta and updating the YAML safely.

Frequently Asked Questions about unity-yaml-editing

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

FAQPage Schema
How do I fix a missing script reference in a Unity prefab?

Read the script's current GUID from its .cs.meta file, then find the m_Script entry in the prefab YAML and set its guid to the correct value. Keep fileID 11500000 and type 3 unchanged, then reimport to validate.

When should I hand-edit Unity YAML instead of using the Editor?

Only when REST or Editor APIs cannot reach the data: compile failures, .meta file edits, hidden ProjectSettings fields, or merge conflicts. For normal GameObject, prefab, or scene work, always prefer the REST skills.

How do I safely change a Unity asset GUID?

Generate the new GUID with uuid4 via python, never by hand. Before changing it, grep the entire project for the old GUID across .asset, .prefab, .unity, and .meta files, and update every reference in the same change.

How do I resolve merge conflicts in Unity scene files?

Resolve per object block, since each --- !u!<classID> &<fileID> block is independent. Take the changed side for single-side edits, do a true 3-way merge for dual-side changes, and verify every referenced fileID still has a defining block.

Why does deleting a component block corrupt a Unity prefab?

A MonoBehaviour block must be removed together with its matching entry in the owner GameObject's m_Component list. Removing only one side leaves a dangling reference that breaks the GameObject.