Commit 4b2b963
committed
fix(prefabs): wire missing C# handler for editor/prefab-stage resource
The mcpforunity://editor/prefab-stage resource was wired Python-side
in PR #1013 ("Prefab stages integration") via
Server/src/services/resources/prefab_stage.py, but its dispatched
`get_prefab_stage` command name was never given a C# handler.
Reading the resource hits CommandRegistry's not-found throw:
Unknown or unsupported command type: get_prefab_stage
This change adds GetPrefabStage at
MCPForUnity/Editor/Resources/Editor/GetPrefabStage.cs, returning the
5 fields the Python PrefabStageResponse pydantic model expects
(isOpen, assetPath, prefabRootName, mode, isDirty) via
PrefabStageUtility.GetCurrentPrefabStage(). Mirrors the EditorState.cs
sibling resource's shape.
No Python-side or schema changes required.1 parent da5de7a commit 4b2b963
2 files changed
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments