← ClaudeAtlas

unity-scene-habitslisted

Prefab-first habits for working in a Unity project through the editor CLI: turn anything groupable into a prefab, make changes as prefab-asset edits instead of scene edits, keep the scene out of the diff unless the task genuinely needs it, never break an asset reference, and say so at the end when another branch already edits the same scene. Use when the work touches a scene, a prefab, an asset or the editor itself: "add this to the scene", "make this a prefab", "why does my scene keep conflicting", "run Unity headless", "-executeMethod", "/unity-scene-habits", or any change that would touch a `.unity`, `.prefab` or `.meta` file.
Xenoneqq/unity-ai-skills · ★ 1 · Code & Development · score 74
Install: claude install-skill Xenoneqq/unity-ai-skills
# Unity scene habits Two rules. Everything below is how to keep them. **Prefab first.** If a thing can be grouped, it is a prefab. Prefabs are cheap to save, cheap to edit, and two people editing two prefabs do not conflict. **Scene last.** A scene is one giant shared file. Every line you add to it is a merge conflict someone else pays for. Change it only when the task cannot be done any other way. Work through the editor CLI, not by hand-editing files. Scene and prefab files are YAML with internal file ids and GUID references; a hand edit that looks right corrupts references you cannot see. The editor is the only safe writer. ## 1. Probe before touching anything Two things decide how you work: the editor version, and whether the Unity CLI is here. Run this from inside the repo. Do not skip it — the project root is often not the repo root, and the quoting matters because project paths contain spaces. ```bash PV=$(find . -path '*/ProjectSettings/ProjectVersion.txt' -not -path '*/Library/*' -print -quit) ROOT=$(dirname "$(dirname "$PV")") VER=$(awk '/^m_EditorVersion:/{print $2}' "$ROOT/ProjectSettings/ProjectVersion.txt") echo "project root : $ROOT" echo "editor version: $VER" awk '/m_SerializationMode/{print "serialization : "$2" (2 = force text; anything else, stop)"}' "$ROOT/ProjectSettings/EditorSettings.asset" if command -v unity >/dev/null; then unity editors -i --verbose --json --no-banner # installed editors, with locations unity license --json --no-ban