Commit 17eb171
feat: replace prefab stage actions with headless modify_contents (#635)
Removes stage-based prefab editing (open_stage, close_stage, save_open_stage)
in favor of headless modify_contents action that uses PrefabUtility.LoadPrefabContents
for reliable automated workflows without UI dialogs.
Changes:
- Remove open_stage, close_stage, save_open_stage actions
- Add modify_contents action for headless prefab editing
- Support targeting objects by name or path (e.g., "Turret/Barrel")
- Support transform, tag, layer, setActive, name, parent, components operations
- Skip saving when no modifications made (avoids unnecessary asset writes)
- Delete PrefabStage.cs resource (no longer needed)
- Update Python tool description to remove "stages" reference
- Consolidate tests from 29 to 14 (covers complex prefabs, reparenting, hierarchy loop guard)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent f5ca917 commit 17eb171
5 files changed
Lines changed: 695 additions & 756 deletions
File tree
- MCPForUnity/Editor
- Resources/Editor
- Tools/Prefabs
- Server/src/services/tools
- TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools
This file was deleted.
This file was deleted.
0 commit comments