Skip to content

ProdFact/codex-unity-bridge

 
 

Codex Unity Bridge

GitHub release CI codecov Unity 2021.3+

Codex Unity Bridge is a file-based bridge that lets Codex trigger Unity Editor operations from a running project.

Attribution

This project is a public Codex-focused fork of ManageXR/claude-unity-bridge.

The original project did the hard foundational work on the file-based bridge design, Unity command execution model, and deterministic CLI workflow. ProdFact's fork ports that work to Codex, separates the runtime so both tools can coexist, and continues development from there.

What This Fork Changes

  • Codex-native packaging and skill installation
  • Separate CLI executable: codex-unity-bridge
  • Separate Unity runtime directory: .codex-unity-bridge/
  • Separate Unity package ID: com.prodfact.codex-bridge
  • Separate C# namespace and logs: ProdFact.CodexBridge, [CodexBridge]

Those changes let the Codex fork coexist with the original Claude bridge:

  • Same machine: safe, because the pip package and installed skill use Codex-specific names
  • Same Unity project: safe, because this fork watches .codex-unity-bridge/ instead of .unity-bridge/

Features

  • Run EditMode or PlayMode tests
  • Trigger script compilation
  • Refresh the asset database
  • Read Unity console logs
  • Inspect editor status
  • Toggle play, pause, and step

Quick Start

1. Install the CLI and Codex skill

macOS / Linux / Git Bash:

curl -sSL https://raw.githubusercontent.com/ProdFact/codex-unity-bridge/main/install.sh | bash

Windows PowerShell:

irm https://raw.githubusercontent.com/ProdFact/codex-unity-bridge/main/install.ps1 | iex

2. Add the Unity package

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

Stable release:

https://github.com/ProdFact/codex-unity-bridge.git?path=/package#v0.3.0

Latest main:

https://github.com/ProdFact/codex-unity-bridge.git?path=/package

3. Use it

Natural Codex prompts:

Run the Unity tests
Check for compilation errors
Show me the last 10 Unity errors

Direct CLI usage:

codex-unity-bridge run-tests --mode EditMode
codex-unity-bridge compile
codex-unity-bridge get-console-logs --limit 10 --filter Error

How It Works

Codex -> codex-unity-bridge -> .codex-unity-bridge/command.json -> Unity Editor -> .codex-unity-bridge/response-{id}.json
  1. Codex or a user runs codex-unity-bridge.
  2. The CLI writes a command file into .codex-unity-bridge/.
  3. The Unity package polls that directory, executes the command, and writes a response file.
  4. The CLI polls for the response, formats the result, and cleans up.

Documentation

About

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

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 49.4%
  • C# 48.8%
  • PowerShell 1.1%
  • Shell 0.7%