unity-editor
Skill7 starsChanged 7 months agoMITView on GitHub
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
In this repository34 other files it gives its agents.
- unity-mcp-skillsSkill
- unity-animatorSkill
- unity-assetSkill
- unity-cameraSkill
- unity-cinemachineSkill
- unity-cleanerSkill
- unity-componentSkill
- unity-consoleSkill
- unity-eventSkill
- unity-gameobjectSkill
- unity-importerSkill
- unity-lightSkill
- unity-materialSkill
- unity-navmeshSkill
- unity-optimizationSkill
- unity-packageSkill
- unity-perceptionSkill
- unity-physicsSkill
- unity-prefabSkill
- unity-probuilderSkill
- unity-projectSkill
- unity-sceneSkill
- unity-scriptableobjectSkill
- unity-scriptSkill
- unity-shaderSkill
- unity-smartSkill
- unity-terrainSkill
- unity-testSkill
- unity-timelineSkill
- unity-toolingSkill
- unity-uiSkill
- unity-uitoolkitSkill
- unity-validationSkill
- unity-xrSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 132
Use console_set_pause_on_error from the console module.
- Distinctive: line 144
Check editor state before play mode operations
- Distinctive: line 145
Don't modify scene during play mode (changes lost)
- Distinctive: line 146
Use undo for safe experimentation
- Very specific: line 147
Use editor_get_context to get instanceId for batch operations
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Unity Editor Skills
Overview
Control the Unity Editor itself - enter play mode, manage selection, undo/redo, and execute menu items.
Common Mistakes
DO NOT (common hallucinations):
editor_rundoes not exist → useeditor_playto enter play modeeditor_compile/editor_recompiledo not exist → usedebug_force_recompileeditor_savedoes not exist → useeditor_execute_menuwith menuPath"File/Save"editor_execute_menurequires exact menu path — typos cause silent failure
Routing:
- For compilation check → use
editor_get_state(isCompilingfield) - For console errors → use native
Unity_ReadConsoleorUnity_GetConsoleLogs - For scene save →
scene_save(scene module) oreditor_execute_menumenuPath="File/Save"
Skills Overview
| 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) |
Skills
editor_play
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.
editor_stop
Exit play mode.
editor_pause
Toggle pause state.
editor_select
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
editor_get_selection
Get currently selected objects.
Returns: {success, count, objects: [{name, instanceId}]}
editor_get_context
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 state
editor_undo
Undo the last action.
editor_redo
Redo the last undone action.
editor_get_state
Get current editor state.
Returns: {isPlaying, isPaused, isCompiling, timeSinceStartup, unityVersion, platform}
editor_execute_menu
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 |
editor_get_tags
Get all available tags.
Returns: {success, tags: [string]}
editor_get_layers
Get all available layers.
Returns: {success, layers: [{index, name}]}
Pause On Error
Pause-on-error is provided by the console module, not the editor module.
Use console_set_pause_on_error from the console module.
Example Usage
See ../../recipes/editor/<command>.md for C# templates.
Recipe path rule: ../../recipes/editor/<command>.md
Best Practices
- Check editor state before play mode operations
- Don't modify scene during play mode (changes lost)
- Use undo for safe experimentation
- Use
editor_get_contextto get instanceId for batch operations - Menu commands must match exact paths
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

