UnityCtl.Protocol 0.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package UnityCtl.Protocol --version 0.3.2
                    
NuGet\Install-Package UnityCtl.Protocol -Version 0.3.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UnityCtl.Protocol" Version="0.3.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UnityCtl.Protocol" Version="0.3.2" />
                    
Directory.Packages.props
<PackageReference Include="UnityCtl.Protocol" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UnityCtl.Protocol --version 0.3.2
                    
#r "nuget: UnityCtl.Protocol, 0.3.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UnityCtl.Protocol@0.3.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UnityCtl.Protocol&version=0.3.2
                    
Install as a Cake Addin
#tool nuget:?package=UnityCtl.Protocol&version=0.3.2
                    
Install as a Cake Tool

UnityCtl

Let AI agents drive the Unity Editor. Edit scripts, compile, play, screenshot, debug—all from the command line.

What Can AI Do With This?

Edit and Compile

An agent modifies your C# scripts, then compiles:

# Agent edits PlayerController.cs, then...
unityctl asset refresh

Compilation errors appear directly in the output. The agent iterates until it compiles.

Play Mode + Screenshots

Enter play mode and capture what's happening:

unityctl play enter
unityctl screenshot capture
unityctl logs                 # shows all logs since last clear
unityctl play exit

The agent can see the game running and read any Debug.Log output.

Execute Arbitrary C#

Run any C# code in the editor—create objects, set properties, click buttons, open windows, whatever:

# Spawn a cube at the origin
unityctl script execute -c "using UnityEngine; public class Script { public static object Main() { return GameObject.CreatePrimitive(PrimitiveType.Cube).name; } }"

# Find the player and move them
unityctl script execute -c "using UnityEngine; public class Script { public static object Main() { var p = GameObject.Find(\"Player\"); p.transform.position = new Vector3(0, 10, 0); return \"moved\"; } }"

Installation

Requires .NET 10 SDK or newer.

Linux/macOS:

curl -sSL https://raw.githubusercontent.com/DirtybitGames/unityctl/main/scripts/install.sh | bash

Windows (PowerShell):

iwr https://raw.githubusercontent.com/DirtybitGames/unityctl/main/scripts/install.ps1 | iex

Or install manually:

dotnet tool install -g UnityCtl.Cli
dotnet tool install -g UnityCtl.Bridge

Project Setup

Run setup from your Unity project directory (or any parent folder like a monorepo root):

unityctl setup

This installs the Unity package and Claude Code skill. If run outside a Unity project, it will prompt for the project path and save it to .unityctl/config.json for future commands.

Quick start: unityctl bridge start, open Unity, unityctl status

Or launch Unity via CLI: unityctl bridge start, unityctl editor run, unityctl status

More Commands

Command Description
unityctl setup One-command project setup (config + package + skill)
unityctl update Update CLI, bridge, and Unity package
unityctl editor run Launch Unity Editor (auto-detects version)
unityctl editor stop Stop running Unity Editor
unityctl asset refresh Refresh assets and trigger compilation
unityctl logs View logs since last clear (use -n to limit, --full for all history)
unityctl scene load <path> Load a scene
unityctl scene list List scenes in build settings
unityctl test run Run edit mode tests
unityctl test run --mode playmode Run play mode tests
unityctl menu execute <path> Execute Unity menu item
unityctl asset import <path> Import an asset
unityctl config set/get/list Manage configuration
unityctl package add/remove/status Manage Unity package
unityctl skill add/remove/status Manage Claude Code skill

Run unityctl --help for the full command list.

Architecture

┌─────────┐        ┌────────┐        ┌──────────────┐
│ unityctl│──HTTP──│ bridge │──WS────│ Unity Editor │
│  (CLI)  │        │(daemon)│        │   (plugin)   │
└─────────┘        └────────┘        └──────────────┘

The bridge daemon survives Unity's domain reloads, so your workflow isn't interrupted when scripts recompile.

Motivation

This project comes from a frustration with trying to use claude code to be productive in Unity. It is great at spitting out code that looks OK but doesn't compile. It would try to call unity in batch mode to compile, but Unity refuses since the editor is running. Having the editor open is key to being in the loop and getting visual confirmation that things are working.

There are MCP servers for Unity, but they eat a lot of context window for any task that doesn't require driving the editor. By creating a CLI that claude can learn by trying to use it (and can "remember" on demand through the skill.md), claude is able to use the editor on demand without a constant context cost.

The API is kept simple, and leans mostly on the script execution to get work done. Claude is good at writing ad-hoc scripts to achieve a goal in unity, and this seems more flexible and reliable than implementing APIs for managing or editing specific types of assets.

Documentation

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.1 32 2/10/2026
0.4.0 29 2/10/2026
0.3.6 79 2/4/2026
0.3.5 81 2/3/2026
0.3.4 74 2/3/2026
0.3.3 88 1/11/2026
0.3.2 82 1/11/2026
0.3.1 87 1/9/2026
0.3.0 88 1/8/2026
0.2.2 360 11/30/2025
0.2.1 123 11/29/2025
0.2.0 180 11/27/2025
0.1.1 403 11/19/2025
0.1.0 404 11/19/2025