Thanks for your interest in contributing! Here's how to get started.
- Create or open a clean Unity
2022.3+test project - Add this repository to the project as a local package or Git package
- Open the project in Unity Editor and wait for compilation to finish
- Open Funplay → MCP Server
- Start the server and confirm it is reachable at
http://127.0.0.1:8765/
- C# with 4-space indentation (see
.editorconfig) - All classes are
internal(editor-only plugin) - Use the
Funplay.Editornamespace family for editor code - Comments in Chinese or English are both fine
- Create or edit a class in
Editor/Tools/Builtins/ - Annotate the class with
[ToolProvider("CategoryName")] - Add
[Description("...")]to the method - Use
[ToolParam("description")]on parameters - Method signature:
public static string MethodName(...) - Use
Undo.*APIs for scene-modifying tools
See README.md for a full example.
Before submitting a PR, please verify the change in a Unity test project:
- Open Funplay → MCP Server
- Confirm the MCP server starts successfully
- Run at least one read-only workflow such as
get_scene_info - If your change affects scene editing, run at least one write workflow such as
create_game_object - If your change affects scripts or recompilation, trigger a compile and confirm the server recovers correctly
- Do not commit local files such as
.idea/,.DS_Store, temporary exports, or scratch files - Keep Unity
.metafiles in sync with any added, moved, or deleted assets - Keep PRs focused: one fix, feature, or cleanup per PR
- Update
README.mdfor user-visible behavior changes - Update
README_CN.mdwhen the English README changes materially - Update
CHANGELOG.mdfor changes that affect users or contributors
- Fork the repo and create a feature branch
- Make and test your changes in Unity Editor
- Run through the validation steps above
- Submit a PR with a clear description of what changed and why
By contributing, you agree that your contributions will be licensed under MIT.