unity-yaml-editing

Repairs Unity serialized YAML files by fixing GUIDs, fileID references, and merge conflicts.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-yaml-editing-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-yaml-editing
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/yaml-editing
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-yaml-editing-pcone-mm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When Unity scenes, prefabs, or assets break in ways the Editor and REST APIs cannot fix — such as missing scripts after a rename, corrupted .meta GUIDs, hidden ProjectSettings fields, or Git merge conflicts in .unity files — the only remaining option is careful hand-editing of the serialized YAML, which is risky without strict rules. ## Core Features & Use Cases - Reference and fileID Repair: Re-point broken m_Script GUID references in prefabs and scenes, or safely delete Missing components by removing both the object block and its m_Component entry. - .meta and GUID Safety: Detect pseudo-random GUIDs, regenerate them with uuid4, and update every referencing file in the same change to avoid collisions. - ProjectSettings Patching and Merge Conflict Resolution: Edit hidden ProjectSettings YAML fields and resolve Git conflicts in .unity/.prefab files block-by-block without dropping objects or leaving dangling references. - Use Case: A renamed C# script leaves a prefab showing "missing script" and the scene won't open. 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 Fix the missing script reference in my prefab by updating its m_Script GUID to match the renamed script's .meta file.

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 that value while keeping fileID: 11500000 and type: 3. Reimport the asset in Unity to confirm the component resolves.

How to resolve Git merge conflicts in Unity scene files?

Unity YAML is line-mergeable because each object is an independent --- !u!<classID> &<fileID> block. Resolve per block, taking the changed side for single-side edits and doing a true 3-way merge for blocks changed on both sides, then verify every referenced fileID still has a defining block.

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

Only as a last resort: when a compile failure prevents deserialization, when editing .meta files or hidden ProjectSettings fields with no API, or when resolving merge conflicts. For normal object, prefab, or scene work, use the Editor or REST APIs since they keep serialization valid.

Why does changing a Unity asset GUID break references?

A GUID is the asset-level identity referenced by every .unity, .prefab, .asset, and .meta file that points to it. Changing the GUID without updating all referencing files orphans those references, so grep the whole project and update every occurrence in the same change.

How do I safely delete a missing component from a Unity scene file?

Remove the entire --- !u!114 &<fileID> MonoBehaviour block and the matching {component: {fileID: <fileID>}} entry under the owner GameObject's m_Component list. Removing only one of the two corrupts the file.