From msw-unity
Unity 씬 구성 및 GameObject 배치 자동화 (에디터 스크립트 기반). Use when the user asks to create a scene, add GameObjects, or set up a test scene.
How this skill is triggered — by the user, by Claude, or both
Slash command
/msw-unity:unity-sceneThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Unity 씬에 GameObject를 배치하고 컴포넌트를 구성합니다. 씬 YAML을 직접 편집하지 않고 에디터 스크립트(MenuItem)를 생성하여 안전하게 씬을 구성합니다.
Unity 씬에 GameObject를 배치하고 컴포넌트를 구성합니다. 씬 YAML을 직접 편집하지 않고 에디터 스크립트(MenuItem)를 생성하여 안전하게 씬을 구성합니다.
씬 YAML 직접 편집 금지 — Unity 씬 파일(.unity)은 GUID 참조가 복잡하므로, 반드시 에디터 스크립트를 통해 구성합니다.
최소한의 씬 YAML 생성 (설정만 포함, GameObject 없음):
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
...
--- !u!104 &2
RenderSettings:
...
--- !u!157 &3
LightmapSettings:
...
--- !u!196 &4
NavMeshSettings:
...
--- !u!1660057539 &9
SceneRoots:
m_ObjectHideFlags: 0
m_Roots: []
using UnityEditor;
using UnityEngine;
public static class {SceneName}Setup
{
[MenuItem("Tools/Setup {SceneName}")]
public static void SetupScene()
{
// 카메라 생성
// 라이트 생성
// 게임 오브젝트 생성 + 컴포넌트 추가
// Prefab 인스턴스화 (AssetDatabase.FindAssets 사용)
}
}
Tools > Setup {SceneName} 메뉴 실행생성 전 반드시 해당 예제를 Read로 로드하여 패턴을 확인:
| 예제 | 경로 | 내용 |
|---|---|---|
| 에디터 씬 구성 | references/examples/01-editor-scene-setup.md | MenuItem 패턴, GUID 검색, Undo, 혼합 씬 |
var camGo = new GameObject("Main Camera");
camGo.tag = "MainCamera";
var cam = camGo.AddComponent<Camera>();
cam.orthographic = true;
cam.orthographicSize = 5;
cam.transform.position = new Vector3(0, 1, -10);
cam.backgroundColor = new Color(0.12f, 0.12f, 0.18f);
var guids = AssetDatabase.FindAssets("PrefabName t:Prefab");
if (guids.Length > 0)
{
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(
AssetDatabase.GUIDToAssetPath(guids[0]));
var instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab);
instance.transform.position = Vector3.zero;
Undo.RegisterCreatedObjectUndo(instance, "Create PrefabName");
}
var go = new GameObject("MyObject");
go.AddComponent<Rigidbody2D>();
go.AddComponent<BoxCollider2D>();
go.AddComponent<MyCustomScript>();
Undo.RegisterCreatedObjectUndo(go, "Create MyObject");
Undo.RegisterCreatedObjectUndo 호출Selection.activeGameObject로 설정Editor/ 폴더에 배치AssetDatabase.FindAssets로 동적 검색Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub choigawoon/msw-cc-plugins --plugin msw-unity