skills/scene-editing-guide/SKILL.md
Provides guidelines for creating and modifying Unity scene and prefab files in Unity projects. Make sure to use this skill whenever creating, editing, or modifying .unity scene files or .prefab prefab files, or writing editor scripts under Assets/Editor/ that generate or manipulate scenes, prefabs, or scene-bound assets. This includes adding GameObjects, building uGUI hierarchies, wiring up components, and any task that results in changes to .unity or .prefab files. Even for small edits or one-line scene changes, load this skill to ensure scene-authoring conventions are followed.
npx skillsauth add nowsprinting/claude-code-settings-for-unity scene-editing-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide for creating and editing Unity scene files in Unity projects.
.unity or .prefab files. Instead, write an editor script under Assets/Editor/ and execute it in Unity to create or update the scene or prefab.EditorSceneManager.SaveScene (or PrefabUtility.SaveAsPrefabAsset for prefabs). Treat "no dirty scenes/assets at script exit" as a hard postcondition.
EditorSceneManager.SaveScene(scene, path) (new) or EditorSceneManager.SaveScene(scene) (existing). The return value is true on success.PrefabUtility.SaveAsPrefabAsset(go, path). When editing via LoadPrefabContents, always pair with SaveAsPrefabAsset → UnloadPrefabContents.AssetDatabase.SaveAssets() after the per-object saves to flush pending writes.unity_play_control, get_unity_compilation_result, run_method_in_unity, and run_unity_tests must be called strictly one at a time — always wait for each call to return before making the next one. Calling them concurrently causes domain-reload conflicts that result in "canceled" or "did not connect within 30 seconds" errors.error or canceled, wait 10 seconds before retrying. Domain reload typically takes several seconds; immediate retry hits the same in-flight reload and fails again. Do not switch tools in the meantime (e.g., calling unity_play_control to verify state) — that just compounds the multiplexed calls. If the same tool returns error or canceled on two consecutive attempts (with the 10-second wait between them), stop and consult the user instead of retrying further.unity_play_control tool. If it is, stop it first.get_unity_compilation_result tool before running..claude/skills/scene-editing-guide/scripts/resolve-assembly.sh <cs-file-path>. It walks up directories to find the nearest .asmdef; if none is found, it falls back to Assembly-CSharp-Editor (path contains /Editor/) or Assembly-CSharp.run_method_in_unity tool (MCP Server Extension for Unity) for execution. Define a public static method in the script (adding [MenuItem("Tools/...")] is optional) and invoke it directly via run_method_in_unity. Only fall back to execute_run_configuration or other alternatives when run_method_in_unity is unavailable..meta files manually — Unity generates them automatically. Match each .meta file's commit fate to its paired asset:
.unity, .prefab) and their referenced assets (materials, SOs, etc.) → commit (required for GUID resolution)Assets/Editor/*.cs) and their .meta → do not commit (orphaned metas break the other checkout if the script is absent)Assets/Editor/) and their .meta files are not committed. Do not delete them — leave them for the user to remove manually. Do not add them to .gitignore; the user excludes them at commit time.UnityEngine.UI.Button / UnityEngine.UI.Text). Do not use TextMeshPro unless the user explicitly requests it.LoadSceneMode.Additive): EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single) — no camera or light needed.LoadSceneMode.Single): EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single) — Main Camera and Directional Light are included automatically; do not add a camera manually.ObjectFactory.CreateGameObject and save with EditorSceneManager.SaveScene(scene, "Assets/YourFeature/Scenes/XxxScene.unity").EditorSceneManager.OpenScene(path, OpenSceneMode.Single) → make changes → EditorSceneManager.SaveScene(scene).PrefabUtility.SaveAsPrefabAsset(go, "Assets/YourFeature/Prefabs/XxxPrefab.prefab").PrefabUtility.LoadPrefabContents(path) → modify → PrefabUtility.SaveAsPrefabAsset(root, path) → PrefabUtility.UnloadPrefabContents(root).ObjectFactory.CreateGameObject / ObjectFactory.AddComponent so Undo history and Presets are applied automatically.transform.SetParent(parent, worldPositionStays: false)..claude/skills/scene-editing-guide/resources/ugui.mdrun_method_in_unity tool is not available or fails with a connection error: Read .claude/skills/scene-editing-guide/resources/troubleshooting-run-method-in-unity.mdtesting
Orchestrates the test-first implementation planning workflow for feature implementation and spec changes. Use this skill whenever plan mode is active and the task involves implementing or adding a new feature, or changing an existing specification. Even if the user only says "plan this" or "how should we implement this", load this skill to ensure the full test-first planning workflow is followed.
testing
Diagnoses and fixes bugs using a test-first workflow (reproduce, diagnose, fix). Use this skill whenever the user reports a bug, describes unexpected behavior, or asks to investigate or fix a defect. Even if the user says "something's broken", "this isn't working", "fix this bug", or "why does X happen", load this skill to guide the full reproduce → diagnose → fix cycle.
development
Creates and modifies Unity scene and prefab files. Use this skill whenever creating, editing, or modifying .unity scene files or .prefab prefab files, or writing editor scripts under Assets/Editor/ that generate or manipulate scenes, prefabs, or scene-bound assets. This includes adding GameObjects, building uGUI hierarchies, wiring up components, and any task that results in changes to .unity or .prefab files.
tools
Provides guidelines for directly editing Unity YAML-serialized asset files for Unity projects. Make sure to use this skill whenever creating, editing, or modifying simple YAML asset files (ScriptableObjects, Materials, etc.) via Edit/Write tools without going through the Unity Editor. This includes adjusting ScriptableObject field values, modifying material shader properties, or any task that results in direct changes to allowlisted Unity YAML asset files. Even for small edits or one-line value changes, load this skill to ensure Unity asset-YAML conventions are followed.