From unity-coding-skills
Guides direct editing of Unity YAML asset files (ScriptableObjects, Materials) outside the Unity Editor, enforcing correct YAML structure, field ordering, and cross-file references.
How this skill is triggered — by the user, by Claude, or both
Slash command
/unity-coding-skills:unity-yaml-editing-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for directly editing Unity YAML-serialized asset files for Unity projects.
Guide for directly editing Unity YAML-serialized asset files for Unity projects.
AnimationClip, AnimatorController, Texture2D, Mesh, AudioClip, LightingDataAsset, etc.) carry binary-derived data or complex internal structure — open them in Unity Editor instead.
MonoBehaviour, class ID 114) — files *.assetMaterial, class ID 21) — files *.mat.unity or .prefab files. Use edit-scene skill — those carry GameObject/Prefab-instance structure that is unsafe to author by hand..meta files. Unity owns .meta content (GUIDs, importer settings); hand-edits corrupt asset references project-wide.%YAML 1.1 and %TAG !u! tag:unity3d.com,2011: — these are not stylistic, and Unity will fail to load the asset if they drift.--- !u!<classID> &<fileID> — for ScriptableObject use --- !u!114 &11400000, for Material use --- !u!21 &2100000 (canonical local anchors).MonoBehaviour:), the order is m_ObjectHideFlags → m_CorrespondingSourceObject → m_PrefabInstance → m_PrefabAsset → m_GameObject → m_Enabled → m_EditorHideFlags → m_Script → m_Name → m_EditorClassIdentifier. User fields come after.m_Name in sync with the filename (without the .asset / .mat extension) — a mismatch confuses Unity's importer and Resources.Load-style lookups.{fileID: N, guid: <32-hex>, type: T} where type: 2 is a project asset and type: 3 is a script. Local references use {fileID: N} matching an &N anchor in the same file; {fileID: 0} means null.\uXXXX inside double quotes — plain ASCII stays unquoted. Match how Unity itself emits the file.*name), extra tags, or chomping indicators (|, >). Unity's YAML parser drops or rejects them, and re-save would strip cosmetic formatting anyway — don't bother polishing what Unity will normalize.get_unity_compilation_result. Review the diff Unity produces on next save to confirm the edit was accepted as intended.%YAML 1.1 before editing. If it does not, the project is in Binary or Mixed serialization mode and the asset must not be hand-edited — open it in the Unity Editor instead.m_Script GUID. Copy from an existing asset of the same ScriptableObject type, or look up the script's .cs.meta file — fabricated GUIDs detach the asset from its script.<PropertyName>k__BackingField. Do not rename them to the property name — the serialized name is the C# compiler's backing-field symbol.0 / 1 (never true / false), enums and ints bare, floats as plain decimals, Vector3 as {x: 0, y: 0, z: 0} flow style, Quaternion as {x: 0, y: 0, z: 0, w: 1}, Color as {r: 1, g: 1, b: 1, a: 1}.| Type | Form | Example |
|---|---|---|
| bool | 0 / 1 | m_Enabled: 1 |
| int / enum | bare integer | <Cost>k__BackingField: 1 |
| float | plain decimal | m_Glossiness: 0.5 |
| ASCII string | unquoted | m_Name: DryPrinciple |
| non-ASCII string | double-quoted, \uXXXX escapes | "DRY原則" |
| Vector3 | flow mapping | {x: 0, y: 0, z: 0} |
| Quaternion | flow mapping | {x: 0, y: 0, z: 0, w: 1} |
| Color | flow mapping | {r: 1, g: 1, b: 1, a: 1} |
| local ref | flow mapping | {fileID: 11400000} |
| cross-file ref | flow mapping | {fileID: 11400000, guid: <32-hex>, type: 2} |
| null ref | flow mapping | {fileID: 0} |
| list of refs | block sequence with - bullets | one - {fileID: ...} per line |
.asset or .mat file (header, m_Script, class-typed contents, or unfamiliar field): Read ${CLAUDE_SKILL_DIR}/resources/asset-yaml-format.mdnpx claudepluginhub nowsprinting/unity-coding-skills --plugin unity-coding-skillsManages Unity assets: dependency inspection, reference integrity checks, prefab/scriptable-object creation, and package add/remove via the `u` CLI.
Diagnoses and repairs broken references, Variant overrides, and wiring errors in Unity Prefabs, Scenes, and Assets via MCP tools. Includes Editor Bridge setup for write operations.
Controls the Unity Editor from the terminal via the `ucp` CLI. Automates scenes, GameObjects, assets, builds, tests, packages, and profiling over a WebSocket/JSON-RPC bridge.