Stats
Actions
Tags
Help us improve
Share bugs, ideas, or general feedback.
From unity-coding-skills
Creates and modifies Unity scene and prefab files, including GameObjects, uGUI hierarchies, and component wiring. Activates when editing .unity or .prefab files.
npx claudepluginhub nowsprinting/unity-coding-skills --plugin unity-coding-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/unity-coding-skills:edit-sceneThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Guide for creating and editing Unity scene files in Unity projects.
Guides technical evaluation of code review feedback: read fully, restate for understanding, verify against codebase, respond with reasoning or pushback before implementing.
Share bugs, ideas, or general feedback.
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 — those carry GameObject/Prefab-instance structure that is unsafe to author by hand.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.mcp__jetbrains__unity_play_control tool. If it is, stop it first — Play Mode may skip recompilation, leaving stale code active.mcp__jetbrains__get_unity_compilation_result tool before running.${CLAUDE_SKILL_DIR}/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.mcp__jetbrains__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 mcp__jetbrains__run_method_in_unity. Only fall back to execute_run_configuration or other alternatives when mcp__jetbrains__run_method_in_unity is unavailable.UnityEngine.UI.Button / UnityEngine.UI.Text). Do not use TextMeshPro unless the user explicitly requests it.mcp__jetbrains__unity_play_control, mcp__jetbrains__get_unity_compilation_result, mcp__jetbrains__run_method_in_unity, and mcp__jetbrains__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 mcp__jetbrains__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..meta files follow an asymmetric commit rule. Never create them manually — Unity generates them automatically. Scene/prefab files (.unity, .prefab) and their referenced assets (materials, SOs, etc.) must be committed (required for GUID resolution); editor scripts (Assets/Editor/*.cs) and their .meta must not be committed — orphaned metas break the other checkout if the script is absent. 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.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_SKILL_DIR}/resources/ugui.mdmcp__jetbrains__run_method_in_unity tool is not available or fails with a connection error: Read ${CLAUDE_SKILL_DIR}/resources/troubleshooting-run-method-in-unity.md