Skip to content

feat: Add scene management tools (save, get_info, unload)#97

Merged
CoderGamester merged 2 commits intoCoderGamester:mainfrom
PhilipLudington:feature/scene-management-tools
Jan 12, 2026
Merged

feat: Add scene management tools (save, get_info, unload)#97
CoderGamester merged 2 commits intoCoderGamester:mainfrom
PhilipLudington:feature/scene-management-tools

Conversation

@PhilipLudington
Copy link
Copy Markdown
Contributor

Summary

  • Add get_scene_info tool to retrieve information about loaded scenes
  • Add save_scene tool to save the current scene or a specific scene
  • Add unload_scene tool to unload a scene (when multiple scenes are loaded)

Changes

  • Server~/src/tools/getSceneInfoTool.ts: Get active scene, loaded scene count, and scene details
  • Server~/src/tools/saveSceneTool.ts: Save scene with optional path for Save As
  • Server~/src/tools/unloadSceneTool.ts: Unload scene with validation (prevents unloading only scene)
  • Editor/Tools/GetSceneInfoTool.cs: Unity-side implementation
  • Editor/Tools/SaveSceneTool.cs: Unity-side implementation
  • Editor/Tools/UnloadSceneTool.cs: Unity-side implementation
  • Server~/src/index.ts: Register new tools
  • Editor/UnityBridge/McpUnityServer.cs: Register Unity handlers

Test plan

  • get_scene_info - returned active scene "Starmap" with 7 root objects
  • save_scene - saved scene successfully
  • unload_scene - correctly rejects unloading only scene
  • unload_scene - successfully unloads when multiple scenes loaded

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

PhilipLudington and others added 2 commits January 10, 2026 15:07
Add three new MCP tools for scene management:

- save_scene: Save the active scene, with optional Save As to new path
- get_scene_info: Get comprehensive info about active and loaded scenes
- unload_scene: Unload a scene from hierarchy without deleting asset

C# tools:
- Editor/Tools/SaveSceneTool.cs
- Editor/Tools/GetSceneInfoTool.cs
- Editor/Tools/UnloadSceneTool.cs

TypeScript handlers:
- Server~/src/tools/saveSceneTool.ts
- Server~/src/tools/getSceneInfoTool.ts
- Server~/src/tools/unloadSceneTool.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@PhilipLudington PhilipLudington force-pushed the feature/scene-management-tools branch from 9c50f73 to addd688 Compare January 10, 2026 21:07
Copy link
Copy Markdown
Owner

@CoderGamester CoderGamester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for all this extension PRs to improve the tools provided by the MCP @PhilipLudington

LGTM

@CoderGamester CoderGamester merged commit ca85117 into CoderGamester:main Jan 12, 2026
1 check passed
@PhilipLudington PhilipLudington deleted the feature/scene-management-tools branch January 12, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants