The Immersive Debugger AI Assistant is an experimental feature. How the tool works with AI, its dependencies, and the setup flow may change in future versions.
Overview
The Immersive Debugger AI Assistant extends the Immersive Debugger with an in-VR chat panel. While wearing the headset, you talk (push-to-talk voice dictation) to an AI coding agent that has live, runtime understanding of your scene. It can find objects, inspect components, modify properties, spawn objects, and show debug gizmos, all without you taking the headset off.
How it works
When you speak through the in-headset panel using Meta XR Voice SDK dictation, the tool connects to a supported CLI coding agent that you configured on your computer and authenticated under your own subscription.
The SDK hands that agent a debugging-focused system prompt and exposes a set of runtime tools (over MCP) that let the agent reach into the Unity runtime, whether in the headset or any connected Unity instance, to find objects, inspect components, modify properties, spawn objects, and draw debug gizmos.
Use cases
Troubleshoot gameplay in-headset: “Where is this object?” or “List all the grabbable objects in the scene.” The agent searches the live scene and explains it in natural language.
Spawn and modify objects by voice: “Duplicate this object and move it one meter away” or “Change the size of this object.” The agent instantiates objects, adds components, and tweaks transforms at runtime.
Visual debugging: “Select this object and show me the bounding boxes.” The agent selects the object in the inspector and draws debug boundaries.
Run your own workflows: if your AI agent is configured with project source access, custom [Tool] runtime tools, the official Unity Editor MCP, or external MCP servers, the agent can use all of them (for example, generate a full scene report and send it).
There are no hard boundaries: hook in your own skills, MCP servers, and runtime tools to do more.
Prerequisites
Before proceeding with this tutorial, complete the setup steps outlined in Set Up Unity for XR development to create a project with the necessary dependencies.
In addition, you need:
Unity 6 LTS or later
Meta XR Core SDK v205 or later on an existing project
Voice SDK (com.meta.xr.sdk.voice): required — the feature uses it to start the voice conversation. Planned to migrate to other dictation solutions in a future version.
A supported AI coding agent installed and authenticated. Registered backends: Claude Code, Gemini CLI, OpenAI Codex, and OpenCode
A Meta Quest headset on the same accessible network as your computer
Set up the AI Assistant
Setup has two parts: first connect your AI coding agent once through the AI Tools Setup Wizard, then enable the Immersive Debugger AI Assistant.
Part 1: Connect your AI coding agent
The AI Tools Setup Wizard is the single entry point for AI setup. In the Meta XR SDK Window, select AI Tools. If the window isn’t visible, select Window > Meta > Meta XR SDK to open it.
In Unity 6000.3 or later, you can pin the SDK menu to the toolbar. Right-click the Unity toolbar and select Meta XR SDK > SDK menu.
Install AI Agent Bridge. Select Install AI Agent Bridge. This is the component that lets your in-headset app reach out to an AI coding agent running on your computer. Wait for the green “AI Agent Bridge is installed” check.
Connect your AI coding agent. Select your agent tab. Either select Run Command for one-click registration, or copy the commands and run them in a terminal. Wait for “Connection verified”. This registers the MCP tools your AI agent needs to reach runtime information in your headset.
Note: On Windows, allow the firewall setting in the same AI Tools window — this lets the headset connect to Unity on your local network.
Part 2: Enable the Immersive Debugger AI Assistant
In the Meta XR SDK Window, select Immersive Debugger. If the window isn’t visible, select Window > Meta > Meta XR SDK to open it. Select Enable (available at runtime in the Editor and on-device).
Open the AI Assistant section and select Enable.
A Remote Server bridges the headset and the Editor. The IP address, port, and access token must match on both the headset build and the Editor.
Configure push-to-talk input (controller button or pinch gesture) in this section.
Confirm the validation help box shows a successful connection to your agent client.
Deploy and use on your headset
Ensure all rules pass in the Project Setup Tool, then build an APK and deploy.
During gameplay, toggle on the Immersive Debugger, then the AI Assistant Panel.
Verify the connection indicators are green.
Push-to-talk (hold the A button or pinch with the middle finger), speak a command, and release. The agent reply streams progressively (thinking, then tool calls, then reply).
Troubleshooting
Connection lost or indicators not green
The agent connects through two HTTP servers (the Agent Bridge Remote Server and the Tools/MCP Bridge). Confirm both are running.
Verify the IP address, port, and access token match exactly between the deployed headset build and the Editor. A mismatch shows “not connected” pill indicators in the panel.
The headset and the Editor machine must be on the same accessible network.
Windows firewall blocking the connection
The Remote Server and MCP HTTP server listen on local ports that the headset connects to. Windows Firewall can silently block these inbound connections.
Allow Unity (and the AI Agent Bridge) through Windows Defender Firewall for Private networks, and ensure the configured port is not blocked.
If indicators stay red on Windows despite matching IP, port, and token, a firewall block is the most likely cause. Test by temporarily allowing the app, then add a scoped rule.
“Usage limit” or rate-limit errors from the Voice SDK demo token
The built-in demo token is shared by everyone, so it reaches its usage limit quickly. If you see rate-limit or quota errors, create your own token in wit.ai (free) and configure the feature to use that instead of the shared demo token.
AI responses are slow to start, or slow between turns
Responsiveness depends on the configured CLI agent, its setup, and the network connection.
If your agent is launched with many skills and MCP servers loaded, both startup and every back-and-forth are slower (each exchange re-spins the agent). Trim the skills and MCP servers your agent loads, or expect longer waits per turn.
Voice dictation not working
Voice input needs the Voice SDK, a prerequisite (see Prerequisites). If it isn’t installed, install it and re-open the AI Assistant settings.
If push-to-talk doesn’t trigger the recording indicator, check the Voice Input settings. The controller button and pinch gesture are both configurable and may have been remapped.
Key concepts
Concept
Notes
Dormant by default
The Agent Bridge and MCP Bridge back-ends start only when explicitly enabled.
Your agent, your usage
The feature uses your own CLI agent under your own subscription; the SDK provides the prompt, tools, and bridge.
Agent Bridge abstraction
Switch between supported clients without changing your workflow.
Runtime MCP tools
The agent queries and changes the scene, game objects, and components through a structured tool protocol.
Remote Agent Server
The headset connects out to the Editor over HTTP for AI access.