Launch Claude Code, Codex, or Grok Build from Unity and give the coding agent access to your live editor through MCP. The conversation runs in the agent's own terminal; the Unity window shows tool activity and permission prompts.
This is an independent project by Splatterface Games, not Unity's official Assistant. It is not affiliated with or endorsed by Unity Technologies. Development began before the Unity CLI was released.
- Native coding-agent terminals: Launch Claude Code (labelled Claude Agent in the UI), Codex, or Grok Build with their own authentication and model selection.
- Live Unity tools: Inspect and change scenes, assets, scripts, console output, and editor selection through MCP.
- Editor permission prompts: Choose a permission mode for each launched session and review gated operations inside Unity.
- Activity feed: See the tool calls each connected session makes against the editor.
- Script reload recovery: Keep the MCP service running while Unity reloads scripts and reconnect the editor afterward.
- C# language intelligence: Expose diagnostics, symbols, navigation, completions, and signature help through a project-scoped language server.
- Asset generators: Configure separate provider credentials in Preferences for generator features.
The coding harness owns the conversation, model calls, and its native tools. The Unity package launches it with a session token and the local service's MCP endpoint. The service routes Unity operations to the editor and provides service-side tools such as C# language intelligence and checkpoints.
flowchart TB
H["Claude Code / Codex / Grok Build<br/>Interactive terminal: conversation, auth, native tools"]
S["Local .NET 8 service<br/>MCP endpoint, sessions, tool routing, checkpoints"]
U["Unity Editor package<br/>Launcher, activity feed, permission prompts, tool executors"]
L["C# language server<br/>Project diagnostics and code intelligence"]
U -. "Launch terminal with MCP endpoint and token" .-> H
H <-->|"Authenticated MCP over loopback HTTP"| S
S <-->|"Authenticated loopback WebSocket; reconnects after reload"| U
S <-->|"LSP over stdio"| L
Editing C# scripts can trigger a Unity assembly/domain reload. The editor process stays open, but its managed objects, static state, and in-process connections are torn down and recreated. Hosting the agent's MCP endpoint entirely inside that domain would drop the agent connection whenever scripts reload—the very operation a coding agent needs to perform repeatedly.
The separate .NET process keeps the agent-facing MCP endpoint and session state alive during the reload. The coding-agent terminal also stays running. Only the Unity-side WebSocket connection needs to reconnect: the package saves the service PID, endpoint, and authentication token in Unity's SessionState, then restores the connection after the domain loads again.
Tools that explicitly support reload recovery, such as a recompiling script.compile_check, record their pending call ID before the reload and return the fresh result after compilation and reconnection. Editor operations can pause or time out while Unity is unavailable; this is recovery across script reloads, not a guarantee that every in-flight operation survives an editor exit or crash.
- Unity 2022.3 or later.
- .NET 8 SDK to build the local service.
- At least one supported coding-agent CLI installed and authenticated using its own login flow.
-
Clone the repository:
git clone https://github.com/splatterfacegames/unity-assistant.git
-
In Unity's Package Manager, select Add package from disk and choose
packages/com.splatterfacegames.assistant/package.jsoninside the checkout. -
Publish the service into your Unity project's local service directory. From the repository root, replace the output path below with your actual project path:
dotnet publish service/Splatter.Service/Splatter.Service.csproj -c Release -o "<Unity project>/LocalPackages/com.splatterfacegames.assistant-service"The current bootstrap searches for
Splatter.Service.exe; this installation path is intended for Windows. The assembly and source-directory names remain internal implementation names. -
Open Preferences > Splatterface Games > Assistant to check CLI availability. Leave a CLI path empty to use
PATH, or select its executable explicitly. The harnesses manage their own authentication; generator API keys are configured separately in the same Preferences page. -
Open Window > Splatterface Games > Assistant > Chat. Despite the menu item's name, this window is a launcher and activity feed. Select a permission mode and launch a harness; the package starts the local service and opens the agent's terminal in your Unity project directory.
The launcher offers Ask before write, Read only, and Full auto (YOLO). These modes govern access through the assistant's MCP tools. The harness's native file and shell tools retain their own permission controls.
The bridge and MCP endpoint run locally. Model requests made by the harness, and requests from configured generator integrations, can send data to their respective providers; this is not an entirely offline system.
project.list_files- List files matching a patternproject.read_file- Read file contentsproject.write_file- Write/create filesproject.search- Search for text in project files
asset.import- Import external assetsasset.create- Create new assets (materials, scripts, etc.)asset.delete- Delete assets
scene.get_hierarchy- Get scene hierarchyscene.create_gameobject- Create GameObjectsscene.modify_gameobject- Modify existing GameObjects
script.compile_check- Check for compilation errorsscript.get_references- Get type referencescsharp.status- Report C# language-server discovery and capabilitiescsharp.get_diagnostics- Get syntax, semantic, and analyzer diagnosticscsharp.get_symbols- Get types and members declared in a scriptcsharp.hover,csharp.find_definition,csharp.find_references- Navigate C# semanticallycsharp.get_completions,csharp.get_signature_help- Query context-aware code intelligence
The local service starts one project-scoped stdio LSP process and shares it across agent sessions. It automatically discovers csharp-ls on PATH (including ~/.dotnet/tools) or the Roslyn server installed by the VS Code C# extension. Unity-generated .sln and .csproj files provide the engine and package references needed for accurate results.
Install the open-source server with:
dotnet tool install --global csharp-lsFor another standard C# LSP server, launch the service with --csharp-lsp-command <path> and optional --csharp-lsp-arguments <args>. Use csharp.status to see which server was selected, its workspace, capabilities, and any startup error.
console.get_logs- Get Unity console logsconsole.clear- Clear the console
selection.get- Get current Editor selectionselection.set- Set Editor selection
unity-assistant/
├── packages/com.splatterfacegames.assistant/
│ ├── Editor/
│ │ ├── Bootstrap/ # Local service lifecycle and reload recovery
│ │ ├── Bridge/ # Editor/service coordination
│ │ ├── Handlers/ # Tool dispatch and deferred reload results
│ │ ├── Launch/ # Harness terminals, context, and sessions
│ │ ├── Mcp/ # MCP registry import/export
│ │ ├── Settings/ # Preferences and project settings
│ │ ├── Tools/ # Unity tool executors
│ │ ├── Transport/ # WebSocket client
│ │ └── UI/ # Launcher, activity feed, and other windows
│ └── Runtime/Contracts/ # Protocol types shared with the service
└── service/
├── Splatter.Service/ # .NET 8 MCP service and editor bridge
└── Splatter.Service.Tests/
Run from the repository root:
dotnet build service/Splatter.Service/Splatter.Service.csproj
dotnet test service/Splatter.Service.Tests/Splatter.Service.Tests.csprojThe Unity package contains additional Editor tests that run through Unity's Test Runner.
Licensed under the MIT License. Copyright © 2026 Splatterface Games.
Contributions are welcome! Open an issue to discuss a bug or proposed change, or submit a pull request.