YU

youichi-uda/unity-mcp-pro-plugin

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

82 stars 7 forks 质量 76 趋势 18MIT

通过MCP(模型上下文协议)提供147款Unity游戏开发AI工具。将Claude、光标和AI助手连接到你的Unity编辑器。

概览

Unity 编辑器插件,通过 WebSocket 连接 AI 助手(Claude、Cursor、Windsurf、VS Code Copilot)与 Unity 编辑器。 ——场景管理、游戏对象、脚本、预制件、物理、光照、动画、材质、地形、粒子、音频、用户界面、构建流水线、输入模拟、截图、测试、二维、时间线、样条、ECS、网络代码、XR等等。 - — 所有 AI 操作都经过 Unity 的撤销系统(Ctrl+Z)- — 心跳、带指数回撤的自动重新连接、端口扫描(6605–6609) - — 字符串自动转换为 Vector3、Color、Quaternion 等格式 - — 脚本重新编译时不丢失连接状态 - — 内置编辑器窗口用于配置 MCP 服务器和 IDE 集成 - 支持 Unity 2022、2023 和 Unity 6(内置、URP、HDRP) 下载这个仓库,并复制到你项目的 Packages/com.unity-mcp-pro/ 目录中。 这个插件是 Unity MCP Pro 的插件。要配合 AI 助手使用,你还需要 MCP 服务器。 1. (见上文) 2.

概述(AI 翻译)

Unity 编辑器插件,通过 WebSocket 连接 AI 助手(Claude、Cursor、Windsurf、VS Code Copilot)与 Unity 编辑器。

280+工具,涵盖50个类别——场景管理、游戏对象、脚本、预制件、物理、光照、动画、材质、地形、粒子、音频、UI、构建流水线、输入模拟、截图、测试、二维、时间线、样条、ECS、网络代码、XR等等。

特色

  • 完全撤销/重做 — 所有AI操作都经过Unity的撤销系统(Ctrl+Z)
  • 生产级WebSocket — 心跳,带指数回撤自动重连,端口扫描(6605–6609)
  • 智能类型解析 — 字符串自动转换为Vector3、颜色、四元数等。
  • 域重新加载安全 — 脚本重新编译后不丢失连接状态
  • 服务器设置窗口 — 内置编辑器窗口,用于配置MCP服务器与IDE集成
  • Unity 2021.3+ — 支持 Unity 2022、2023 和 Unity 6(内置、URP、HDRP)

50 工具类别

类别 # 类别 #
项目 7 动画 7
场景 6 动画扩展 5
游戏对象 11 UI(画布) 6
剧本 6 音频 5

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Unity MCP Pro — Plugin

Unity editor plugin that connects AI assistants (Claude, Cursor, Windsurf, VS Code Copilot) to the Unity editor via WebSocket.

280+ tools across 50 categories — scene management, GameObjects, scripts, prefabs, physics, lighting, animation, materials, terrain, particles, audio, UI, build pipeline, input simulation, screenshots, testing, 2D, timeline, splines, ECS, netcode, XR, and more.

Features

  • Full Undo/Redo — Every AI operation goes through Unity’s Undo system (Ctrl+Z)
  • Production-grade WebSocket — Heartbeat, auto-reconnect with exponential backoff, port scanning (6605–6609)
  • Smart Type Parsing — Automatic conversion of strings to Vector3, Color, Quaternion, etc.
  • Domain Reload Safe — Survives script recompilation without losing connection state
  • Server Setup Window — Built-in editor window for configuring MCP server and IDE integration
  • Unity 2021.3+ — Supports Unity 2022, 2023, and Unity 6 (Built-in, URP, HDRP)

50 Tool Categories

Category # Category #
Project 7 Animation 7
Scene 6 Animation Extended 5
GameObject 11 UI (Canvas) 6
Script 6 Audio 5
Editor 5 Particle 5
Prefab 6 Navigation 5
Material & Shader 6 Terrain 4
Physics 6 Build Pipeline 5
Lighting 5 Batch Operations 6
Analysis & Profiling 10 Package Manager 6
Input Simulation 8 Debug 5
Runtime Extended 7 Screenshot & Visual 4
Testing & QA 6 2D Tools 6
Controller 4 Timeline 5
Environment 6 Spline 5
Optimization 7 Shader Graph 5
Camera / Cinemachine 6 Visual Scripting 5
Post-Processing 5 Profiler 4
AI Tools 4 Benchmark 4
Game Systems 5 Playthrough 4
Import Settings 5 Watch / Monitor 3
Multi-Scene 4 Undo History 3
Scene View Camera 4 Addressables 5
Custom Editor 4 Localization 4
Rigging 4 ECS / DOTS 4
Netcode 4 XR / VR 4

Installation

Option 1: Unity Package Manager (Git URL)

  1. Open Unity → Window → Package Manager
  2. Click + → Add package from git URL…
  3. Enter:
    https://github.com/youichi-uda/unity-mcp-pro-plugin.git
    

Option 2: Clone to your project

cd YourUnityProject/Packages
git clone https://github.com/youichi-uda/unity-mcp-pro-plugin.git com.unity-mcp-pro

Option 3: Download and copy

Download this repository and copy it into your project’s Packages/com.unity-mcp-pro/ directory.

Setup

This plugin is the Unity-side component of Unity MCP Pro. To use it with AI assistants, you also need the MCP server.

  1. Install this plugin (see above)
  2. Get the MCP server — Available at unity-mcp.abyo.net
  3. Build the MCP server:
    cd server && npm install && npm run build
    
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "unity-mcp-pro": { "command": "node", "args": ["/path/to/server/build/index.js"] } } }