一键导入
unity-editor
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working with a Unity project via MCP — creating or editing scenes, GameObjects, components, prefabs, materials, UI, lighting, navmesh, animations, terrain, C# scripts, or any other Unity Editor task.
Use when users want to run Unity tests or read test results.
Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project.
Use when about to write or install a custom Editor script, add a [MenuItem], build a custom Editor window, or create a one-off Editor helper — to check whether a ready-to-paste template already exists in tooling/<domain>/ before reaching for Unity_CreateScript.
Use when users want to create Canvas, Button, Text, Image, or other UI elements.
Use when users want to find unused assets, duplicate files, or clean up the project.
| name | unity-editor |
| description | Use when users want to enter play mode, select objects, undo/redo, or execute menu commands. |
Control the Unity Editor itself - enter play mode, manage selection, undo/redo, and execute menu items.
DO NOT (common hallucinations):
editor_run does not exist → use editor_play to enter play modeeditor_compile / editor_recompile do not exist → use debug_force_recompileeditor_save does not exist → use editor_execute_menu with menuPath "File/Save"editor_execute_menu requires exact menu path — typos cause silent failureRouting:
editor_get_state (isCompiling field)Unity_ReadConsole or Unity_GetConsoleLogsscene_save (scene module) or editor_execute_menu menuPath="File/Save"| Skill | Description |
|---|---|
editor_play | Enter play mode |
editor_stop | Exit play mode |
editor_pause | Toggle pause |
editor_select | Select GameObject |
editor_get_selection | Get selected objects |
editor_get_context | Get full editor context (selection, assets, scene) |
editor_undo | Undo last action |
editor_redo | Redo last action |
editor_get_state | Get editor state |
editor_execute_menu | Execute menu item |
editor_get_tags | Get all tags |
editor_get_layers | Get all layers |
console_set_pause_on_error | Pause play mode on error (console module) |
Enter play mode. Fire-and-forget: sets EditorApplication.isPlaying = true
and returns { success, mode, started } immediately. Observe the
transition by calling editor_get_state (check isPlaying) in a later
call — recipes cannot span domain reloads.
Exit play mode.
Toggle pause state.
Select a GameObject.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID |
path | string | No* | Object path |
*One identifier required
Get currently selected objects.
Returns: {success, count, objects: [{name, instanceId}]}
Get full editor context including selection, assets, and scene info.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
includeComponents | bool | No | false | Include component list |
includeChildren | bool | No | false | Include children info |
Returns:
selectedGameObjects: Objects in Hierarchy (instanceId, path, tag, layer)selectedAssets: Assets in Project window (GUID, path, type, isFolder)activeScene: Current scene info (name, path, isDirty)focusedWindow: Name of focused editor windowisPlaying, isCompiling: Editor stateUndo the last action.
Redo the last undone action.
Get current editor state.
Returns: {isPlaying, isPaused, isCompiling, timeSinceStartup, unityVersion, platform}
Execute a menu command.
| Parameter | Type | Required | Description |
|---|---|---|---|
menuPath | string | Yes | Menu item path |
Common Menu Paths:
| Menu Path | Action |
|---|---|
File/Save | Save current scene |
File/Build Settings... | Open build settings |
Edit/Play | Toggle play mode |
GameObject/Create Empty | Create empty object |
Window/General/Console | Open console |
Assets/Refresh | Refresh assets |
Get all available tags.
Returns: {success, tags: [string]}
Get all available layers.
Returns: {success, layers: [{index, name}]}
Pause-on-error is provided by the console module, not the editor module.
Use console_set_pause_on_error from the console module.
See ../../recipes/editor/<command>.md for C# templates.
Recipe path rule: ../../recipes/editor/<command>.md
editor_get_context to get instanceId for batch operations