Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>UniBridgeNew to Visual Studio Code? Get it now.
UniBridge

UniBridge

Workshop2D

|
43 installs
| (0) | Free
Localhost RPC bridge between Unity Editor and VS Code for AI-assisted workflows.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

UniBridge (VS Code)

Localhost TCP + NDJSON RPC bridge to the Unity Editor package com.workshop2d.uni-bridge.

Codex MCP integration

UniBridge exposes the active Unity connection to Codex through a local, token-authenticated agent gateway and a stdio MCP adapter. Build the extension, then register out/mcp/server.js in the Unity project's .codex/config.toml, passing the Unity project root as the first argument.

The MCP adapter provides the same unity_* verification tools as the VS Code language-model integration, including compilation, readiness, structured console logs, tests, hierarchy inspection, and play-mode smoke tests. Reload VS Code after updating the extension, and restart Codex after changing MCP configuration.

How it works

  1. Open a Unity project folder in VS Code (Assets/ + ProjectSettings/).
  2. The extension listens on 127.0.0.1 and writes .uni-bridge/session.json.
  3. The Unity package connects as a client, sends core.hello, and stays connected.
  4. Commands and Language Model Tools call Unity over the socket.

Commands

  • UniBridge: Get Context Snapshot
  • UniBridge: Request Compilation
  • UniBridge: Inspect Selection
  • UniBridge: Set Play Mode
  • UniBridge: Run Tests
  • UniBridge: Get Scene Hierarchy
  • UniBridge: Ping Unity

AI tools

Tool Purpose
notify_user Show a completion notification through VS Code
unity_get_context Live editor snapshot
unity_compile Compile and return diagnostics
unity_run_tests Run EditMode/PlayMode tests
unity_inspect_selection Inspect selection / object
unity_set_play_mode enter/exit/pause/resume/step
unity_get_hierarchy Shallow scene tree
unity_search_assets AssetDatabase search
unity_get_logs Filtered console ring buffer (errors/warnings/logs/…)
unity_get_log_path Editor.log path for rare forensic reads
unity_wait_for_ready Wait until Unity idle (survives domain reload)
unity_refresh_assets AssetDatabase.Refresh + wait ready
unity_play_smoke Short Play Mode runtime sanity check

Autonomous loop

Recommended agent sequence after editing scripts:

  1. unity_refresh_assets (or unity_compile)
  2. unity_wait_for_ready (usually already done by the tools above)
  3. unity_run_tests (failedOnly on retries)
  4. optional unity_play_smoke
  5. unity_get_logs if something failed

uniBridge.agentMode defaults to true so verify actions skip confirmation prompts.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft