/editor
Control and observe the Unity Editor state. 控制并观察 Unity 编辑器状态。
$ npx -y skills add Besty0728/Unity-Skills --skill editor --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/editor
Context preview
The summary Claude sees to decide when to auto-load this skill.
Control and observe the Unity Editor state. 控制并观察 Unity 编辑器状态。
SKILL.md
editor.SKILL.mdname: unity-editor
description: Control and observe the Unity Editor state. 控制并观察 Unity 编辑器状态。
Triggers
- Reading persistent scene/file changes
- Driving play mode
- Inspecting runtime state
- Executing menu items
- 读取持久化场景/文件变更、操控 Play Mode、检查运行时状态、执行菜单项
Unity Editor Skills
Observe and control the Unity Editor without parsing scene YAML.
Operating Mode
- **Approval**:本模块 Mixed —— `editor_get_changes` / `editor_get_selection` / `editor_get_context` / `editor_get_state` / `editor_get_tags` / `editor_get_layers` / `editor_playmode_inspect` 标 `SkillMode.SemiAuto`,可直接执行;其余 `editor_select` / `editor_undo` / `editor_redo` / `editor_execute_menu` / `editor_playmode_step` 默认 FullAuto,Approval 模式下需 grant。
- **Auto / Bypass**:FullAuto 直接执行。
- **含 NeverInSemi 高危 skill**:`editor_play` / `editor_play_capture` / `editor_stop` / `editor_pause`(标 `MayEnterPlayMode = true`)。这些在 Approval/Auto 下返 `MODE_FORBIDDEN`,仅 Bypass 或 Allowlist 命中可调。
**DO NOT** (common hallucinations):
- `editor_run` does not exist → use `editor_play` to enter play mode
- `editor_compile` / `editor_recompile` do not exist → use `debug_force_recompile`
- `editor_save` does not exist → use `editor_execute_menu` with menuPath `"File/Save"`
- `editor_execute_menu` requires exact menu path — typos cause silent failure
**Routing**:
- For compilation check → use `debug` module's `debug_check_compilation`
- For console errors → use `debug` module's `debug_get_errors`
- For scene save → `scene_save` (scene module) or `editor_execute_menu` menuPath="File/Save"
- When file watching reports changes, or the AI resumes after the user edited Unity → call `editor_get_changes` before reading `.unity` YAML
- If `editor_get_changes.dropped=true` → its 500-entry retention window was exceeded; rebuild context with `scene_context` / `scene_diff`
Skills Overview
| Skill | Description | |-------|-------------| | `editor_play` | Enter play mode | | `editor_play_capture` | Observe runtime errors, optionally screenshot, then exit | | `editor_stop` | Exit play mode | | `editor_pause` | Toggle pause | | `editor_playmode_step` | Advance Play Mode by N frames (async job) | | `editor_playmode_inspect` | Inspect a GameObject's live runtime state (transform, component fields) | | `editor_select` | Select GameObject | | `editor_get_selection` | Get selected objects | | `editor_get_context` | Get full editor context (selection, assets, scene) | | `editor_get_changes` | Read persistent scene/file changes by cursor | | `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) |
---
Skills
editor_play
Enter play mode. Warning: any unsaved scene changes made during Play mode will be lost when exiting.
**Returns**: `{success, mode, jobId}` — `mode="playing"`, `jobId` returned from `AsyncJobService` so callers can poll `entering_play_mode` completion.
editor_play_capture
Enter Play Mode, observe errors for `durationSeconds` (default 10, range 1–300), optionally capture the Game View, then exit. Returns a Job whose result includes `healthy`, error aggregates, `stoppedEarly`, and `screenshotPath`.
editor_stop
Exit play mode.
**Returns**: `{success, mode}` — `mode="stopped"`.
editor_pause
Toggle pause state.
**Returns**: `{success, paused}` — `paused` is the new boolean state.
editor_playmode_step
Advance Play Mode forward by `frames` (1–100, default 1) using `EditorApplication.Step`; Unity automatically enters paused state as part of stepping. Requires Play Mode to already be active — call `editor_play` or `editor_play_capture` first, otherwise this returns a structured error (`error` + `hint` + `suggestedSkills: ["editor_play", "editor_play_capture"]`). Only one step job may be in flight at a time; a second call while one is still running returns an error naming the active `jobId`.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `frames` | int | No | 1 | Frames to advance, clamped to 1–100 |
**Runs as an async job, not synchronously**: `EditorApplication.Step()` only lands on a later Editor tick, so the skill issues one `Step()` call at a time, confirms it landed by watching `Time.frameCount` advance, and only then issues the next — back-to-back `Step()` calls without that confirmation are not reliable. The call itself returns immediately: `{success, status: "accepted", jobId, framesRequested}`.
Poll `job_status` with the returned `jobId` until `status="completed"`; its `details` then contains `{framesRequested, framesCompleted, frameCount, isPaused}`. **Do not use `job_wait`** — like `playmode`/`play_capture`, this job's progress depends on `EditorApplication.update` ticks, and `job_wait`'s blocking loop runs on the same main thread those ticks come from, so it cannot observe progress; it will just spend its full timeout doing nothing. If Play Mode exits or Unity fails to advance a frame within 10s, the job fails with `failed_exited_play_mode` / `failed_step_timeout`.
editor_playmode_inspect
Inspect a GameObject's live runtime state: transform (position/rotation/scale), `activeSelf`/`activeInHierarchy`, and — when `componentType` is given — that component's public fields and properties (reuses the same reflection helper as `component_get_properties`, not reimplemented). Works during Play Mode, including while paused, and also in Edit Mode, where it returns editor-time values — check `isPlaying`/`isPaused` in the response to know which state the values reflect.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Object name | | `instanceId` | int | No* | Instance ID (preferred) | | `path` | string | No* | Object path | | `compo
Read more
name: unity-editor description: Control and observe the Unity Editor state. 控制并观察 Unity 编辑器状态。
Triggers
- Reading persistent scene/file changes
- Driving play mode
- Inspecting runtime state
- Executing menu items
- 读取持久化场景/文件变更、操控 Play Mode、检查运行时状态、执行菜单项
Unity Editor Skills
Observe and control the Unity Editor without parsing scene YAML.
Operating Mode
- **Approval**:本模块 Mixed —— `editor_get_changes` / `editor_get_selection` / `editor_get_context` / `editor_get_state` / `editor_get_tags` / `editor_get_layers` / `editor_playmode_inspect` 标 `SkillMode.SemiAuto`,可直接执行;其余 `editor_select` / `editor_undo` / `editor_redo` / `editor_execute_menu` / `editor_playmode_step` 默认 FullAuto,Approval 模式下需 grant。
- **Auto / Bypass**:FullAuto 直接执行。
- **含 NeverInSemi 高危 skill**:`editor_play` / `editor_play_capture` / `editor_stop` / `editor_pause`(标 `MayEnterPlayMode = true`)。这些在 Approval/Auto 下返 `MODE_FORBIDDEN`,仅 Bypass 或 Allowlist 命中可调。
**DO NOT** (common hallucinations):
- `editor_run` does not exist → use `editor_play` to enter play mode
- `editor_compile` / `editor_recompile` do not exist → use `debug_force_recompile`
- `editor_save` does not exist → use `editor_execute_menu` with menuPath `"File/Save"`
- `editor_execute_menu` requires exact menu path — typos cause silent failure
**Routing**:
- For compilation check → use `debug` module's `debug_check_compilation`
- For console errors → use `debug` module's `debug_get_errors`
- For scene save → `scene_save` (scene module) or `editor_execute_menu` menuPath="File/Save"
- When file watching reports changes, or the AI resumes after the user edited Unity → call `editor_get_changes` before reading `.unity` YAML
- If `editor_get_changes.dropped=true` → its 500-entry retention window was exceeded; rebuild context with `scene_context` / `scene_diff`
Skills Overview
| Skill | Description | |-------|-------------| | `editor_play` | Enter play mode | | `editor_play_capture` | Observe runtime errors, optionally screenshot, then exit | | `editor_stop` | Exit play mode | | `editor_pause` | Toggle pause | | `editor_playmode_step` | Advance Play Mode by N frames (async job) | | `editor_playmode_inspect` | Inspect a GameObject's live runtime state (transform, component fields) | | `editor_select` | Select GameObject | | `editor_get_selection` | Get selected objects | | `editor_get_context` | Get full editor context (selection, assets, scene) | | `editor_get_changes` | Read persistent scene/file changes by cursor | | `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) |
---
Skills
editor_play
Enter play mode. Warning: any unsaved scene changes made during Play mode will be lost when exiting.
**Returns**: `{success, mode, jobId}` — `mode="playing"`, `jobId` returned from `AsyncJobService` so callers can poll `entering_play_mode` completion.
editor_play_capture
Enter Play Mode, observe errors for `durationSeconds` (default 10, range 1–300), optionally capture the Game View, then exit. Returns a Job whose result includes `healthy`, error aggregates, `stoppedEarly`, and `screenshotPath`.
editor_stop
Exit play mode.
**Returns**: `{success, mode}` — `mode="stopped"`.
editor_pause
Toggle pause state.
**Returns**: `{success, paused}` — `paused` is the new boolean state.
editor_playmode_step
Advance Play Mode forward by `frames` (1–100, default 1) using `EditorApplication.Step`; Unity automatically enters paused state as part of stepping. Requires Play Mode to already be active — call `editor_play` or `editor_play_capture` first, otherwise this returns a structured error (`error` + `hint` + `suggestedSkills: ["editor_play", "editor_play_capture"]`). Only one step job may be in flight at a time; a second call while one is still running returns an error naming the active `jobId`.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `frames` | int | No | 1 | Frames to advance, clamped to 1–100 |
**Runs as an async job, not synchronously**: `EditorApplication.Step()` only lands on a later Editor tick, so the skill issues one `Step()` call at a time, confirms it landed by watching `Time.frameCount` advance, and only then issues the next — back-to-back `Step()` calls without that confirmation are not reliable. The call itself returns immediately: `{success, status: "accepted", jobId, framesRequested}`.
Poll `job_status` with the returned `jobId` until `status="completed"`; its `details` then contains `{framesRequested, framesCompleted, frameCount, isPaused}`. **Do not use `job_wait`** — like `playmode`/`play_capture`, this job's progress depends on `EditorApplication.update` ticks, and `job_wait`'s blocking loop runs on the same main thread those ticks come from, so it cannot observe progress; it will just spend its full timeout doing nothing. If Play Mode exits or Unity fails to advance a frame within 10s, the job fails with `failed_exited_play_mode` / `failed_step_timeout`.
editor_playmode_inspect
Inspect a GameObject's live runtime state: transform (position/rotation/scale), `activeSelf`/`activeInHierarchy`, and — when `componentType` is given — that component's public fields and properties (reuses the same reflection helper as `component_get_properties`, not reimplemented). Works during Play Mode, including while paused, and also in Edit Mode, where it returns editor-time values — check `isPlaying`/`isPaused` in the response to know which state the values reflect.
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | No* | Object name | | `instanceId` | int | No* | Instance ID (preferred) | | `path` | string | No* | Object path | | `compo
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

