/aiman.tech
← Selected workT-003/Unity Control Protocol

Unity Control Protocol

A Rust CLI + C# editor bridge that exposes the Unity Editor as a structured tool surface. Built so heavy agentic dev workflows in Unity stop being impossible.

unityctl.dev
RustC#WebSocketJSON-RPC 2.0
01

Why

Modern agentic development assumes the tool you are working in has a structured, programmatic interface. The Unity Editor was never designed for that. If you wanted an agent to drive a Unity project, your options were: scripting through the Editor's GUI automation surface (slow, brittle), or pretending the Unity project was just a folder of YAML files (loses too much).

UCP fixes this. It turns the Editor into a JSON-RPC server with first-class structured access to scenes, GameObjects, components, materials, prefabs, build pipelines, tests, packages and the profiler. From the outside, the Editor stops being a black box.

02

What it actually does

The shape is intentionally simple. A Rust CLI (the user-facing tool) and a C# bridge inside the Editor talk over a WebSocket with JSON-RPC 2.0. Every Editor action that has a programmatic counterpart gets exposed as a method. Every method has a well-typed input and output. The protocol is small enough to audit.

In practice, that means an agent (or a human at the terminal) can:

  • Inspect, create and modify scenes and GameObjects.
  • Add and configure components, materials, prefabs.
  • Selectively import .unitypackage contents instead of dumping everything.
  • Run builds, tests, asset processors, packages.
  • Set Editor settings, hook into debugging and profiling.
03

Distribution

UCP ships as a Rust crate and a Unity package, plus - usefully - a Claude Code skill, so any session inside Claude Code that needs to touch a Unity project can drop into the protocol without any extra setup. That last detail matters: the friction of getting from "agent" to "Editor" was the whole reason I built this in the first place.

Want to argue with any of this