hatayama/unity-cli-loop

Let AI Drive Unity, from Editor to Play Mode.

What it solves

Unity CLI Loop removes the need for manual human intervention during Unity development by allowing AI agents to control the Unity Editor directly from the terminal. It automates repetitive tasks like compiling code, running tests, inspecting logs, and manipulating scenes, enabling a fully autonomous AI-driven development loop.

How it works

The project provides a command-line interface (CLI) that acts as a bridge between your LLM tool (like Claude Code or Codex) and the Unity Editor. It uses a local IPC server—communicating via Unix domain sockets or named pipes rather than TCP ports—to send commands directly into the Editor. This allows the AI to execute C# code, simulate mouse and keyboard input, capture screenshots, and perform hot-reloads without leaving the game or waiting for manual recompilation.

Who it’s for

This tool is for developers who use AI agents to assist with Unity project development and want to enable those agents to perform complex, multi-step operations like debugging, UI testing, and scene building autonomously.

Highlights

  • Autonomous Development Loop: AI can compile, test, and fix issues automatically, including pausing execution at specific lines to inspect variables.
  • Instant Hot-Reload: Apply method-body code changes to a running game instantly without waiting for a full recompile.
  • Comprehensive Editor Control: Perform complex operations like scene hierarchy inspection, object manipulation, and UI testing via mouse/keyboard simulation.
  • Minimal Tooling Philosophy: Uses a small, essential set of tools, relying on dynamic C# code execution to handle custom tasks, which keeps the AI's context window clean.
  • No Port Conflicts: Uses local IPC (domain sockets/named pipes) for communication, avoiding the port management issues common in network-based tools.

Related

  • Project
  • Project
  • Project
  • Project
  • Project