-
Notifications
You must be signed in to change notification settings - Fork 127
feat: Introduce CreatePrefabTool across Unity and Node pipelines #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added a detailed markdown document summarizing the CreatePrefabTool feature implementation, including its integration in Unity Editor, Node.js server, documentation, and testing results.
Implemented CreatePrefabTool class in Unity Editor (C#) to create prefabs with optional MonoBehaviour script attachment and serialized field value application. Handles prefab naming conflicts and asset database refresh.
Modified McpUnityServer.cs to register the new CreatePrefabTool in the tool list, enabling it to be recognized and used by the MCP Unity Editor.
Added CreatePrefabTool description and example prompt usage to README files in English, Chinese, and Japanese to document the new feature across supported languages.
Updated the MCP server index file to import and register the CreatePrefabTool and the PrefabCreationPrompt enabling the server to handle prefab creation requests.
Added a new MCP server prompt prefabCreationPrompt defining the proper workflow for creating prefabs in Unity with optional MonoBehaviour scripts and serialized fields.
Implemented the MCP server side TypeScript tool wrapper createPrefabTool.ts for the CreatePrefabTool, including parameter validation, error handling, and communication with Unity Editor.
Added simple and updated test scripts for the CreatePrefabTool MCP server wrapper to verify registration, parameter handling, and successful execution scenarios.
Added detailed story documentation for the CreatePrefabTool feature including user story, acceptance criteria, technical notes, and validation checklist.
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…ch the developer workflow
Summary of Changes
This pull request adds comprehensive support for automated prefab creation via MCP:
Unity Editor (C#)
Editor/Tools/CreatePrefabTool.cs
– implements theCreatePrefabTool
for in-editor prefab generation and registration.McpUnityServer.cs
.MCP Node Server (TypeScript)
Server~/src/tools/createPrefabTool.ts
– MCP bridge wrapper calling the Unity side tool.index.ts
andgameobjectHandlingPrompt.ts
.Prompt & Documentation
prefabCreationPrompt
guiding LLM workflows.README.md
,README_zh-CN.md
,README-ja.md
) with usage instructions and examples.Tests & Stories
Housekeeping
Impact
Provides an end-to-end prefab creation capability accessible to AI agents via MCP, improving scene automation workflows.
Auto-generated by Cascade AI assistant.
🛠️ This PR introduces a comprehensive
CreatePrefabTool
that enables automated prefab creation across both Unity Editor and Node.js MCP server pipelines. The implementation allows AI agents to create Unity prefabs with optional MonoBehaviour scripts and serialized field values through MCP protocol communication.🔍 Detailed Analysis
Key Changes
CreatePrefabTool.cs
with complete prefab creation logic, component attachment, field value serialization, and asset database managementcreatePrefabTool.ts
with parameter validation, error handling, and Unity communication bridgeTechnical Implementation
Impact
Created with Palmier