Skip to content

Commit fb9f7e4

Browse files
committed
refactor: remove reload_domain tool and update script management workflow
- Removed reload_domain tool as Unity automatically recompiles scripts when modified - Updated script management instructions to rely on editor_state polling and console checking instead of manual domain reload - Simplified workflow by removing unnecessary manual recompilation step
1 parent 2ea5cfa commit fb9f7e4

File tree

4 files changed

+3
-74
lines changed

4 files changed

+3
-74
lines changed

MCPForUnity/Editor/Tools/ReloadDomain.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

MCPForUnity/Editor/Tools/ReloadDomain.cs.meta

Lines changed: 0 additions & 11 deletions
This file was deleted.

MCPForUnity/UnityMcpServer~/src/server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ def _emit_startup():
169169
- Always check related resources before modifying the engine state with tools
170170
171171
Script Management:
172-
1. After creating or modifying scripts (by your own tools or the `manage_script` tool), ALWAYS call `reload_domain` immediately
173-
2. Wait for Unity to recompile (domain reload is asynchronous) by checking the `editor_state` resource
174-
3. Use `read_console` to check for compilation errors before proceeding
175-
4. Only after successful compilation can new components/types be used
172+
- After creating or modifying scripts (by your own tools or the `manage_script` tool) use `read_console` to check for compilation errors before proceeding
173+
- Only after successful compilation can new components/types be used
174+
- You can poll the `editor_state` resource's `isCompiling` field to check if the domain reload is complete
176175
177176
Scene Setup:
178177
- Always include a Camera and main Light (Directional Light) in new scenes

MCPForUnity/UnityMcpServer~/src/tools/reload_domain.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)