AI Unity 开发平台集成了项目本地工作流程、AIBridge 技能、CLI 和运行时工具、代码索引、可视化验证、输入模拟、
English | 中文
Design principles: simple, easy to use, stable.
AIBridge is a project-local AI development harness for Unity. It combines project rules, AIBridge Skills, CLI tools, Runtime Bridge, code indexing, visual validation, input simulation, Player debugging, and workflow artifacts into a Unity work loop that Codex, Claude, Cursor, and other AI tools can use.
After installing the package and AI-tool integrations, an agent is no longer limited to reading and editing script text. It can resolve real Unity asset paths, inspect scenes and prefabs, modify objects through Unity APIs, run Unity compilation and tests, read Console logs, simulate Play Mode UI input, capture screenshots/GIFs, connect to built Players, and keep validation evidence inside the project.
When HybridCLR is installed, AIBridge can also compile controlled temporary runtime code in the Editor and dispatch it through Runtime Bridge to a target Player for one-off mobile or built-Player diagnostics.
| Scenario | Ask the agent | AIBridge provides | Output |
|---|---|---|---|
| Unity change loop | "Update this Editor panel and verify that Unity still compiles." | Project rules, code lookup, compile unity, Console reads |
Compile result, Error logs |
| Prefab / scene inspection | "Check every button prefab for missing click audio and dry-run the fix." | Asset search, prefab hierarchy, Inspector fields, Prefab Patch dry-run | Patch proposal, dry-run report |
| Play Mode UI validation | "Enter Play Mode, click the inventory button, and confirm that the panel opens." | input click/drag/long-press, Game view screenshot, log checks |
Screenshot/GIF, Error logs |
| Player / mobile debugging | "The Android build login button does nothing. Collect evidence." | Runtime discover/status/logs/screenshot/perf, UI snapshot/find/click/key, handler calls | Target id, logs, screenshot, perf data |
| Performance hotspot report | "Collect a 15-second performance report for the current Player target." | Performance workflow recipe, Editor Profiler snapshots, Runtime perf/log/screenshot evidence | Markdown report, perf artifacts |
| C# declaration lookup | "Locate the PlayerController class or the OpenInventory method." | Read-only code_index name lookup for declaration files and declaration positions |
Candidate file paths and declaration positions |
| Multi-step workflow | "Shard-review Runtime Bridge risks, then run adversarial verification." | Workflow recipes, artifacts, gates, external verdicts, reports | Finding, Verdict, Markdown report |
| Project-specific extension | "Expose a runtime debug entry for reading inventory state." | Runtime handlers, CLI commands, Skills, workflow recipes | Project-specific AI harness capability |
Ask the agent to read project rules and related code first, then use Unity-aware commands to confirm asset, scene, or prefab state. After editing, it should run compile unity, read get_logs --logType Error, and add screenshots, tests, or Runtime evidence when the change needs them.
Use for: Editor tool changes, Runtime script fixes, Prefab field updates, one-off asset generation, and configuration migration.
Ask the agent to enter Play Mode, use input to click, drag, or long-press UGUI/EventSystem UI, then verify the result with logs and screenshots. For Player targets, start with runtime.ui.snapshot to discover buttons and their screen coordinates, then use runtime.ui.click, runtime.ui.raycast, or runtime.input.key for direct follow-up actions. This is useful for buttons, inventory drag/drop, runtime panels, dialogs, and basic interaction regression.
Use for: UI bug reproduction, interaction regression, Game view screenshots, and lightweight visual evidence.
In a Development Build or a target with Runtime Bridge enabled, an agent can discover Players, read status, pull logs, capture screenshots, sample performance, and call project allowlisted handlers. With HybridCLR installed and runtime code execution explicitly enabled, it can also dispatch temporary diagnostic code to the target Player.
Use for: Android/iOS/Windows Player debugging, real-device state collection, pre-release debug-build checks, and mobile one-off probes.
Use workflow recipes when work needs sharded review, adversarial verification, Runtime target sweeps, or cross-turn resume. AIBridge owns recipes, run records, artifacts, gates, reports, and external result import; agent and manual steps are still executed by Codex, Claude, Cursor, or a human operator.
Use for: broad read-only review, multi-target Runtime validation, bug-hunter loops, Prefab asset sweeps, and cross-tool handoff.
input command can click, click Unity screen coordinates, click normalized Unity screen coordinates, drag, and long-press EventSystem UI for button, inventory, and runtime panel checks.AIBridgeRuntime component inside a built Player can expose runtime status, logs, screenshots, performance samples, UI snapshot/find/raycast/click, semantic key input, project allowlisted handlers, and HybridCLR-gated runtime code execution for Development Build and mobile debugging.code_index provides symbol and definition for lightweight C# declaration-name lookup, plus status and doctor for diagnostics. Read returned .cs files directly for real analysis.workflow CLI commands can list, validate, plan, initialize, and run deterministic CLI steps from built-in Unity workflow recipes, then write a project-local run manifest, command results, artifacts, gates, and Markdown report under .aibridge/workflows/runs/.code execute runs .aibridge/code/*.cs or .csx temporary scripts inside Unity Editor for complex one-off asset generation, structured analysis, diagnostics, and Runtime/Public API calls. It is enabled by default in Settings and can be disabled there for untrusted projects or callers..aibridge caches. Cleanup is enabled by default, keeps recently used artifacts, and limits retention to 1-30 days with a default of 30 days. Store short-lived Agent and script output in .aibridge/tmp/; expired legacy root files named tmp_* or tmp-* are also cleaned for compatibility, while other root files are preserved.Real Unity state does not live only in text files. It also lives in Editor state, scene hierarchies, serialized prefab objects, Inspector properties, Play Mode, Players, Console logs, screenshots, and runtime objects. AIBridge's role is to turn those Unity-specific states into a project-local data plane that AI agents can query, modify, validate, and cite as evidence.
AIBridge does not replace AI clients such as Codex, Claude, or Cursor; those tools still provide reasoning, editing, and task orchestration. MCP can also remain in place when a workflow wants a general connection protocol.
The important distinction is protocol layer versus Unity tool layer: AIBridge is not replacing the MCP protocol; it covers the primary responsibility of Unity-MCP-style bridges at the Unity tool layer. For Unity MCP projects that mainly expose Editor call surfaces, AIBridge is usually the broader project-local harness: it also includes project rules, installed AI Skills, a project-local CLI, reload-resilient requests and results, Runtime Bridge, Code Index, evidence-backed validation, and workflow recipes.
| Dimension | AIBridge owns | Unity-MCP-style bridges usually own |
|---|---|---|
| Positioning | Project-local Unity AI harness and validation loop | Unity tool invocation surface or protocol adapter |
| Unity state | Scene, Prefab, Inspector, Console, Play Mode, Player evidence | Common Editor state or tool responses |
| Compile and domain reloads | File requests and results can be polled across reloads; Runtime targets can be rediscovered | Live sessions or connections can drop |
| Multi-project use | Project-local CLI, rules, and Skills from the Unity project root | Server configuration or tool mapping |
| Evidence retention | Command results, logs, screenshots, GIFs, Code Index output, Runtime diagnostics, workflow reports | Often session or tool response state |
| Extension model | Unity commands, Runtime handlers, CLI builders, Skills, recipes | Tool servers, MCP servers, or protocol adapters |
compile unity, asset, scene, inspector, prefab, input, screenshot, code, and get_logs.code_index is disabled by default. Enable it from AIBridge > Settings > Code Index when fast C# declaration-name lookup is needed. It requires a Unity compilation snapshot generated by the Editor, not .sln/.csproj, Visual Studio, Rider, or Build Tools. If the snapshot is missing, run Code Index prewarm from AIBridge settings.runtime commands require an AIBridgeRuntime component in the Player or Play Mode scene; Editor Play Mode can auto inject one when Runtime Bridge is enabled. code runtime_execute also requires the HybridCLR package and Runtime Code Execution to be enabled. Runtime Bridge is disabled by default in Release Builds unless the project explicitly enables it.Install with Unity Package Manager using this Git URL:
https://github.com/liyingsong99/AIBridge.gitTo try the current development branch, install the dev branch explicitly:
https://github.com/liyingsong99/AIBridge.git#devBackup UPM Git URL:
https://gitee.com/lijoujou99_admin/AIBridge.gitYou can also clone this repository into a Unity project's Packages folder.
AIBridge/Workflows in Unity Editor.Skills tab.Install Selected Integrations.Install Unity Project AGENTS.md Template to create a root AGENTS.md.Installed AIBridge Skills are written to each selected tool's default skills directory, such as .codex/skills/ for Codex. You can set a custom directory in the Workflows > Skills tab, but custom directories may not be discovered automatically by the AI tool. Each AI tool receives a minimal RootRule and, when needed for a custom directory, a plugin adapter that references the Skill root. The RootRule includes the fixed project-root-relative CLI path, an explicit $CLI binding, common commands, Skill root, and aibridge-development-workflow entry point. Multi-branch routing, targeted checklists, advanced workflow orchestration guidance, and command references live in the installed workflow Skill and its references/ directory.
You can also open the Workflows > Recommended Library tab, refresh the default obra/superpowers repository, and install third-party Skills into the selected tools' skills directories.
Workflows > Workflow Options stores project-level workflow
暂无开放 Issues,或尚未同步最近议题。