* chore: update Unity version from 2021.3.45f1 to 2021.3.45f2 Older Unity version had the security vulnerability, so we update it * feat: add dynamic version display in editor window settings * refactor: remove manual license file handling from Unity test workflow * Revert "refactor: remove manual license file handling from Unity test workflow" This reverts commit a6ab3d982e792039c01a4afd353e61c7e22a2c3c. * feat: add Unity license credentials to Docker containers in CI workflow * refactor: replace manual Unity license activation with game-ci/unity-activator * refactor: simplify Unity CI setup by removing game-ci activation and using built-in license handling * fix: improve Unity license activation in CI by using unityci image's built-in activation flow * refactor: activate once in a temporary container, then reuse the license in the long-running container Now we got the license secret to be read, we got this error: "Machine bindings don't match". So it seems that the license I generated locally can't be used. So we need to activate the license within the container * Revert "refactor: activate once in a temporary container, then reuse the license in the long-running container" This reverts commit f6a9aa68f910df37cede6f83d535098be2a9f80b. * Revert "fix: improve Unity license activation in CI by using unityci image's built-in activation flow" This reverts commit a9f4c0223bc3467442be6dafa1d9303479623a7c. * Revert "refactor: simplify Unity CI setup by removing game-ci activation and using built-in license handling" This reverts commit 4e5ffc0051a7b15b9d87ecaa06fa646f8b13b0b9. * Revert "refactor: replace manual Unity license activation with game-ci/unity-activator" This reverts commit e9520ee768c4e9d48efc81b1a9c3cac3986cc96a. * Revert "feat: add Unity license credentials to Docker containers in CI workflow" This reverts commit 01b8879e35baaf88239988b51e6d4f1e5daaa1cf. |
||
|---|---|---|
| .. | ||
| Editor | ||
| Runtime | ||
| UnityMcpServer~/src | ||
| Editor.meta | ||
| README.md | ||
| README.md.meta | ||
| Runtime.meta | ||
| package.json | ||
| package.json.meta | ||
README.md
MCP for Unity — Editor Plugin Guide
Use this guide to configure and run MCP for Unity inside the Unity Editor. Installation is covered elsewhere; this document focuses on the Editor window, client configuration, and troubleshooting.
Open the window
- Unity menu: Window > MCP for Unity
The window has four areas: Server Status, Unity Bridge, MCP Client Configuration, and Script Validation.
Quick start
- Open Window > MCP for Unity.
- Click “Auto-Setup”.
- If prompted:
- Select the server folder that contains
server.py(UnityMcpServer~/src). - Install Python and/or uv if missing.
- For Claude Code, ensure the
claudeCLI is installed.
- Select the server folder that contains
- Click “Start Bridge” if the Unity Bridge shows “Stopped”.
- Use your MCP client (Cursor, VS Code, Windsurf, Claude Code) to connect.
Server Status
- Status dot and label:
- Installed / Installed (Embedded) / Not Installed.
- Mode and ports:
- Mode: Auto or Standard.
- Ports: Unity (varies; shown in UI), MCP 6500.
- Actions:
- Auto-Setup: Registers/updates your selected MCP client(s), ensures bridge connectivity. Shows “Connected ✓” after success.
- Rebuild MCP Server: Rebuilds the Python based MCP server
- Select server folder…: Choose the folder containing
server.py. - Verify again: Re-checks server presence.
- If Python isn’t detected, use “Open Install Instructions”.
Unity Bridge
- Shows Running or Stopped with a status dot.
- Start/Stop Bridge button toggles the Unity bridge process used by MCP clients to talk to Unity.
- Tip: After Auto-Setup, the bridge may auto-start in Auto mode.
MCP Client Configuration
- Select Client: Choose your target MCP client (e.g., Cursor, VS Code, Windsurf, Claude Code).
- Per-client actions:
- Cursor / VS Code / Windsurf:
- Auto Configure: Writes/updates your config to launch the server via uv:
- Command: uv
- Args: run --directory server.py
- Manual Setup: Opens a window with a pre-filled JSON snippet to copy/paste into your client config.
- Choose
uvInstall Location: If uv isn’t on PATH, select the uv binary. - A compact “Config:” line shows the resolved config file name once uv/server are detected.
- Auto Configure: Writes/updates your config to launch the server via uv:
- Claude Code:
- Register with Claude Code / Unregister MCP for Unity with Claude Code.
- If the CLI isn’t found, click “Choose Claude Install Location”.
- The window displays the resolved Claude CLI path when detected.
- Cursor / VS Code / Windsurf:
Notes:
- The UI shows a status dot and a short status text (e.g., “Configured”, “uv Not Found”, “Claude Not Found”).
- Use “Auto Configure” for one-click setup; use “Manual Setup” when you prefer to review/copy config.
Script Validation
- Validation Level options:
- Basic — Only syntax checks
- Standard — Syntax + Unity practices
- Comprehensive — All checks + semantic analysis
- Strict — Full semantic validation (requires Roslyn)
- Pick a level based on your project’s needs. A description is shown under the dropdown.
Troubleshooting
- Python or
uvnot found: - Claude CLI not found:
Tips
- Enable “Show Debug Logs” in the header for more details in the Console when diagnosing issues.