
Unity AI Bridge
io.github.butterlatte-zhang由 GitHub 账号 butterlatte-zhang 发布v1.0.0更新于 Oct 24, 2026
Remote-control Unity Editor from any AI IDE via file-based IPC. 62 tools, zero dependencies.
概览
让 AI 助手在本地远程控制 Unity 编辑器:查看场景、编辑资源与脚本、运行测试、性能分析,并驱动播放模式测试。
- 可以做什么
- Unity AI Bridge 提供约 65 个 Unity 编辑器工具,涵盖 Scene、GameObject、Assets、Prefab、Script、Editor、Reflection、Screenshot、Runtime、Console、Profiler、Package、Light Probe 和 Tests 等类别。助手可以打开和保存场景、创建或修改游戏对象与组件、读写脚本、截图、读取控制台日志、采集性能分析快照,并在播放模式下查询或调用运行时状态。它与 Unity 插件通过基于文件的 IPC 通信,而不是网络套接字,并同时支持 skill/CLI 模式和 MCP 模式。
- 适用场景
- 当助手需要深入 Unity 项目内部而不只是编辑文件时使用:查看或修改场景与预制体、检查编译错误、运行 Unity 测试、做性能分析,或执行自动化的“编写—测试—修复”播放测试循环。适用于 Windows 或 macOS 上的 Unity 2022.3 LTS 及更新版本项目。
- 运行要求
- 本地 Unity 项目需安装 com.aibridge.unity 包(通过 git URL 或复制包目录),并配置支持 skill 或 MCP 模式的 AI IDE。该桥接是纯 Python 标准库实现的 CLI/MCP 服务器,无需 pip、npm 或 Node.js 运行时。未声明任何账号、API 密钥、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Unity AI Bridge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Unity AI Bridge
Remote-control the Unity Editor from any AI IDE — no ports, no dependencies, just works.
[Unity 2022.3+] [License: Apache 2.0] [GitHub stars] [Release] [Glama]
https://github.com/user-attachments/assets/4e8b3f85-b209-406f-a96e-f8b8eddc9160
Why Unity AI Bridge?
Most AI coding assistants can read and write files, but they are blind to the Unity Editor — they can't inspect your scene, tweak materials, run tests, or profile performance. Unity AI Bridge gives AI full editor access.
Key Advantages
- 65 tools, 15 categories — Scene, GameObject, Assets, Prefab, Script, Profiler, LightProbe, Screenshot, Runtime, Tests, and more. Covers the full editor workflow, not just file I/O.
- File-based IPC, not WebSocket — No open ports, no firewall issues, no connection drops. Survives recompilation, play-mode transitions, and editor restarts gracefully.
- Zero external dependencies — Pure Python stdlib CLI/MCP server, self-contained C# Unity package. No pip install, no npm, no Node.js runtime.
- Every major AI IDE — Claude Code (Skill mode), Cursor, GitHub Copilot, Windsurf, Claude Desktop (MCP mode). One Unity plugin, all IDEs.
- 5-line extensibility — Add custom tools with
[BridgeTool]attribute. Auto-discovered, auto-serialized, auto-documented. No registration code needed. - Production-tested — Built for and battle-tested in a large-scale open-world Unity game (50+ developers, 2M+ lines of C#).
vs Unity 6 AI Gateway
Unity 6.2 introduced an official AI Gateway with MCP support. Both projects share the same goal — giving AI agents editor access via MCP — but differ in important ways:
In practice, the ~100ms file-polling latency is imperceptible because AI agent think-time dominates each round trip. File IPC also makes cross-process debugging trivial — just inspect the JSON files on disk.
Quick Start
AI-native project — Copy the prompt below and send it to your AI coding assistant. The setup guide is written for AI to follow — you don't need to run any commands yourself.
If you prefer manual setup:
-
Unity Package — In Unity: Window > Package Manager > + > Add package from git URL:
Or manually copy
Packages/com.aibridge.unityfrom this repo into your project'sPackages/directory. -
IDE Integration — Copy
.claude/to your project root, then configure your IDE per docs/SETUP.md.
Supports: Claude Code (Skill mode), Cursor, GitHub Copilot, Windsurf, Claude Desktop (MCP mode).
Tool Categories
65 tools organized into 15 categories:
Architecture
Dual-channel design: The same Unity plugin serves both Skill mode (direct CLI) and MCP mode (protocol server). Both channels communicate through the same file-based IPC — a pair of request/response files on disk. No network sockets, no port conflicts, no firewall rules.
Why file IPC? Unity's main thread is single-threaded and blocks during domain reload. File polling is the most reliable way to survive recompilation, play-mode transitions, and Editor restarts without losing messages.
Beyond Editing — AI as Game Tester
Most Unity AI tools stop at file editing. Unity AI Bridge goes further — it turns Claude Code (or any AI IDE) into a game testing harness.
AI Playtest Loop
The pattern: Act → Wait → Observe → Judge → Repeat
- Act:
runtime-invokecalls static methods to trigger game actions - Wait:
wait_playmode.py/wait_compile.pyhandle timing - Observe:
runtime-queryreads MonoBehaviour fields +screenshot-capturefor visuals - Judge: AI analyzes state/screenshots to decide PASS/FAIL
Auto-Playtest Example | AI Closed-Loop Guide | Playtest Tool Reference
Add Your Own Tools
Expose any static method to AI with a single attribute:
The bridge discovers tools at Editor startup via reflection. No registration code, no config files. Parameters are automatically mapped to JSON Schema for the AI to call.
Security
Unity AI Bridge runs entirely on your local machine. The file IPC channel is scoped to your user's temp directory, and no network listeners are opened.
See SECURITY.md for details.
Compatibility
Platforms: Windows, macOS
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Report bugs and request features via GitHub Issues
- Submit pull requests against the
mainbranch - Add new tools by following the
[BridgeTool]pattern above
Acknowledgments
Unity AI Bridge is derived from Unity-MCP by Ivan Murzak (Apache License 2.0). See THIRD_PARTY_NOTICES.md for details.
License
来源:README.md,提交 546583b
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分