Skip to content
 
 

Repository files navigation

Agents Unity Bridge

English | 中文

Unity 2021.3+ Python 3.8+

GitHub release CI

codecov License: Apache 2.0

File-based bridge enabling AI agents to trigger Unity Editor operations in a running editor instance.

✨ Features

  • Run Tests — Execute EditMode or PlayMode tests
  • Compile — Trigger script compilation
  • Refresh — Force asset database refresh
  • Get Status — Check editor compilation/update state
  • Get Console Logs — Retrieve Unity console output
  • Play Mode Control — Play, pause, and step through frames
  • Build — Direct builds or custom build pipelines
  • Asset Dependency Analysis — Dependencies, references, unused assets, path tracing, search, and asset info
  • Prefab Management — Inspect prefab metadata and hierarchy, create prefabs from scene objects
  • Asset Inspector Dump — Dump Inspector-visible serialized field values of prefabs, assets, and scenes

🤖 Agent Installation

Give an AI agent this repo link and it installs everything automatically:

https://github.com/WarrenMondeville/agents-unity-bridge

The agent reads the Installation guide and runs the install commands (pip install + install-skill) on its own. The Unity package itself is added inside the Unity Editor (see Quick Start below).

🚀 Quick Start

1. Add the Unity Package

In Unity: Window > Package Manager > + > Add package from git URL...

https://github.com/WarrenMondeville/agents-unity-bridge.git?path=package

2. Install the CLI & Skill

In Unity, open Tools > Unity Bridge > Open Installer, then click Install Python CLI and Install Skill.

Or install manually from a terminal:

pip install "git+https://github.com/WarrenMondeville/agents-unity-bridge.git#subdirectory=skill"
agents-unity-bridge install-skill

If agents-unity-bridge is not on your PATH, use python -m agents_unity_bridge.cli instead.

3. Use It

Open your AI agent in your Unity project directory:

"Run the Unity tests"
"Check for compilation errors"
"Show me the error logs"

Or use the CLI directly:

agents-unity-bridge run-tests --mode EditMode
agents-unity-bridge compile
agents-unity-bridge get-console-logs --limit 10

Updating

agents-unity-bridge update

⚙️ How It Works

AI agents → agents-unity-bridge CLI → .agents-unity-bridge/command.json → Unity Editor → response.json
  1. AI agent (or you) runs agents-unity-bridge commands
  2. The CLI writes commands to .agents-unity-bridge/command.json
  3. Unity Editor polls and executes commands
  4. Results appear in .agents-unity-bridge/response-{id}.json

Each Unity project has its own .agents-unity-bridge/ directory, enabling multi-project support.

📚 Documentation

About

A file-based Command Protocol enabling deepseek harness to trigger Unity Editor operations. Built for multi-agent and highly parallelized workflows.

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages