CLI + MCP + AI IDE (ChatGPT Codex/Cursor/Antigravity/Claude Code/Windsurf): Next Steps for Unity Workflow Automation

RooCode is flexible and the agent setup is smart, but in bigger Unity projects it feels slower than Cursor or Antigravity. Especially when working across multiple C# files or refactoring.

For Unity automation, I get better results using AI to generate editor scripts and custom tooling rather than gameplay code. Scene level AI features are still basic.

If workflow speed matters, latency and project scale handling matter more than feature list.

1 Like

Sorry for self-promoting, but I’ve just released my take on communications between LLM agents and would be happy to hear any feedback. It works great for me so far, but maybe it will also help you with your setup? This solution is MCP compatible but offers something more than the plain MCP server.
Here is my post about CodeMode in Unity

Also, the key is always have a correct setup of context area with .claudeignore or similar rules, suitable system prompt and agents configurations.

1 Like

I’ve tried this one, installed it very easily and it’s working great. Many thanks! For now I think it’s the best one out there… we’ll have to keep an eye on it in case they improve it even more! Or if you know of any video tutorial showing its capabilities… so far I’ve only created basic things to test it

1 Like
2 Likes

At last I finally got around to testing your tools — very cool!

What is the difference between this and just setting up unity mcp. I am very very new to the claude workflow. Currently just prompting claude for the next step (make healthbar, make combat etc)

Any good resource on how to like structure or build on requirements? I mean first I just want A combat system but as I go along I will need to define the rules more. Should I define the rules from the get go or just I add rules incrementally? Any tips for a complete newbie is much appreciated

1 Like

Hey guys, a bit late to this, but I recently came across this CLI-first tool that allows fully streamlined workflow automation with any agent (at least any agent that follows the Agent-Skills schema), its very easy to setup, manages dependencies and very lightweight (CLI in Rust, project and platform agnostic, installed via npm → Unity package dependency injected and updated from CLI), literally just works

take a look, its open source too

1 Like

Hi everyone, I wanted to share a quick update on my automation workflow.

I’ve fully moved over to ChatGPT Codex. For me, it’s cheaper than Claude Code, and it’s also very convenient to use with the version of Visual Studio that comes with Unity. One thing I really like is that Codex makes it easy to work with multiple projects at the same time, which matters a lot for me since I often have to monitor or actively work across several projects simultaneously.

Antigravity was a real disappointment. Even with the expensive subscription, the performance was poor, so I ended up canceling it. I also canceled Claude Code because I was burning through the included credits way too fast on the cheaper plan. Right now, ChatGPT Codex is by far the tool I’m happiest with.

I’ve also moved away from the MCP approach. In practice, the CLI approach is much faster. I’d definitely recommend giving this a try:

https://github.com/youngwoocho02/unity-cli - Very fast and lightweight

And

https://github.com/mflRevan/unity-control-protocol - Large, heavy, and highly functional

===

Another thing I noticed is that ChatGPT Codex works surprisingly well even without skills. Sometimes it actually performs worse when skills are added. With Claude Code and Antigravity, I had to depend on skills much more heavily.

As an experiment, I asked Codex to analyze my existing skills. It ended up throwing out about 90% of them and explained why. In most cases, those skills were just adding extra complexity on top of capabilities that ChatGPT Codex already seems to handle out of the box.

Also, if you’re interested in skills, agent setups, and related workflows, this is a pretty good resource:

https://github.com/Donchitos/Claude-Code-Game-Studios

Also, I recommend reading more about this approach: https://github.com/bmad-code-org/BMAD-METHOD

2 Likes

Meanwhile, I’ve transitioned from Rider+Copilot plugin to Open Code, which has both a Desktop app and a CLI version. 0 skills, the built in Plan, Build, Review templates together with AGENTS.md are good with both claude and openai models. I use oauth logins of ChatGPT and GitHub Copilot, which both work great. I’m still on the Coplay MCP though, and it has a decent amount of friction. Might be time to check out those CLI editor tools.

1 Like

CLI is very impressive - I definitely recommend trying it. I was especially impressed by how fast it analyzes screenshots.

Copilot is a poor solution in my experience. The functionality is buggy, and overall it feels like stepping back a full year.

I also used Open Code. One of its strong points is support for working with local models, and overall the feature set is quite powerful.
But if you are specifically using ChatGPT, I don’t think there is a real alternative to ChatGPT Codex at the moment. It simply works faster than Open Code.


By the way, I’m still looking for good skills for Figma and for building Unity UI layouts through Figma MCP. If anyone here has already done something like that, I’d be interested to hear about your experience.

Will do.

Yeah, and the Rider plugin is always behind the VS Code implementation in just about everything. Copilot also has CLI, though, which I haven’t tried.

I still feel that Opus 4.6 is the superior architect and debugger if compared to GPT 5.4. I can run Opus 4.6 for planning and Sonnet 4.6 for implementation most of the month with the $39/month Github subscription since they charge per premium requests which includes launching subagents for free in the same session. Claude models are also less verbose and more surgical than ChatGPT (in my experience), which I strongly prefer.

Honestly, I don’t feel a huge difference between GPT-5.4 and Opus 4.6.

Opus 4.6 is definitely strong, no question about that. But it burns through credits very quickly.

I liked GPT-5.4 through Codex. It can realistically take a whole bunch of prefabs, analyze their YAML, and even make edits to them. With Opus, I’d probably only get one request like that before running into limits. )

What I really think is bad, though, is Gemini and Antigravity. I really dislike it when a model starts talking to me in an overly soft or sugary way during technical discussions. Another issue is that it doesn’t seem to manage context size properly - the context runs out, but it keeps going anyway, and in the end everything is broken or forgotten.

1 Like

Hi @skdev3, thank for sharing, i would like to ask if you have any tool or wofkflow about generate UI follow by design can work with codex ?

1 Like

I connected MCP for Figma, described the layout rules, texture rules, import rules, and settings. After that, I tried to recreate a Figma window in Unity.

Then I added corrections: how to name objects, textures, where to place them, how to name prefabs, how to use DOTween for animations, what was wrong, what mistakes were made, and so on.

After that, I created a flow. I simply asked Codex to write down what worked well, what was successful, and to use it as a rule going forward.

Then I asked Codex to write a Python CLI to shorten and simplify the steps, so I could save context for UI layout work.

I also described which elements can be used and how.

In general, this is a short list of actions showing how I built the system. Unfortunately, I cannot share it because of legal reasons related to the company I work for. But you can repeat my path based on this description.

Hi everyone. I’ll tell you about my harness for AI programming in Unity. I’m currently using OpenAI Codex. You can also work with Claude. In that case, replace AGENTS.md with CLAUDE.md.

The first thing you need to do is set this base prompt(go to Codex personalization and set):

IMPORTANT: Before doing anything, you must read AGENTS.md from the project root.

Do not analyze, edit, create, delete, refactor, or suggest code until AGENTS.md has been fully read and applied.

AGENTS.md defines the project rules, architecture, coding style, naming, restrictions, and workflow. These instructions have priority over your default behavior.

IMPORTANT: Do not shorten, simplify, skip, or avoid the task.
Your goal is to complete the user request fully, not partially.
Do not replace the requested work with advice, summaries, or explanations.
Do not say that the task is too large if it can be done step by step.
Do not stop after analysis. Analysis is only useful if it leads to implementation.
Do not skip files that are relevant to the task.

If sub-agents are available and the task can be split into independent parts, use them. Do not avoid sub-agents when they would improve search, implementation, validation, or review quality.

The second step is to create an AGENTS.md file in the root of the project and add the tools for connecting to Unity.

AGENTS.md

Project Local Tools

The project should use local tools from the Tools/ directory. Prefer these tools over globally installed alternatives so every developer and automation agent uses the same versions.

Tool Sources

Expected Tool Layout

Tools/
  ripgrep-15.1.0/
    rg.exe
  UnityCli/
    unity-cli.cmd
    unity-cli.sh
  UCP/
    ucp.cmd
    ucp.sh

If a required tool folder is missing, report the missing tool and path. Do not silently replace it with an unrelated global installation.

Connecting the Tools

ripgrep

Download or vendor ripgrep from:

GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern while respecting your gitignore · GitHub

Place the executable under:

Tools/ripgrep-15.1.0/rg.exe

Use it for fast project search, file discovery, and code navigation.

Examples:

Tools/ripgrep-15.1.0/rg.exe "SearchText"
Tools/ripgrep-15.1.0/rg.exe -n "class Player"
Tools/ripgrep-15.1.0/rg.exe --files
Tools/ripgrep-15.1.0/rg.exe -n "TODO" Assets
Tools/ripgrep-15.1.0/rg.exe -n "PlayerPrefs" Assets -g "*.cs"

Rules:

  • Use ripgrep before slower search tools.
  • Run it from the project root when possible.
  • Prefer targeted searches in Assets, Packages, ProjectSettings, Tools, or documentation folders.

UnityCli

Download or vendor UnityCli from:

GitHub - youngwoocho02/unity-cli: Control Unity Editor from the command line. No MCP, no Python, no dependencies — just a single binary. · GitHub

Expected launcher paths:

Tools/UnityCli/unity-cli.cmd
Tools/UnityCli/unity-cli.sh

UnityCli is used for quick Unity Editor operations, small probes, logs, compile refresh, screenshots, menu calls, and custom [UnityCliTool] commands.

Requirements:

  • Unity Editor must be open.
  • The UnityCli connector package must be installed in the Unity project.
  • If multiple Unity instances are open, select the target project with --project <path> or the target bridge port with --port <number>.

Useful commands:

Tools/UnityCli/unity-cli.cmd status
Tools/UnityCli/unity-cli.cmd console --lines 50
Tools/UnityCli/unity-cli.cmd console --type error,warning --stacktrace full
Tools/UnityCli/unity-cli.cmd editor refresh --compile
Tools/UnityCli/unity-cli.cmd editor play --wait
Tools/UnityCli/unity-cli.cmd editor stop
Tools/UnityCli/unity-cli.cmd menu "File/Save Project"
Tools/UnityCli/unity-cli.cmd screenshot --view game --output_path Temp/game.png
Tools/UnityCli/unity-cli.cmd list
Tools/UnityCli/unity-cli.cmd exec "UnityEngine.Object.FindObjectsOfType<UnityEngine.Camera>().Length"

Use UnityCli when:

  • You need a quick editor status check.
  • You need to read or clear Unity console logs.
  • You need to trigger script compilation or asset refresh.
  • You need to run a short C# probe.
  • You need to call a known Unity menu item.
  • You need to invoke an existing custom [UnityCliTool].

Do not use UnityCli for large multi-step scene, prefab, or asset workflows when UCP provides a safer structured command.

UCP

Download or vendor UCP from:

GitHub - mflRevan/unity-control-protocol: Rust-based Unity Control CLI + C# bridge layer. Exposes editor, debugging and lifecycle structured tool access outside of Unity. Highly recommended for heavy agentic development workflows. · GitHub

Expected launcher paths:

Tools/UCP/ucp.cmd
Tools/UCP/ucp.sh

UCP is used for structured Unity automation across scenes, GameObjects, components, prefabs, assets, packages, settings, builds, tests, profiler data, references, and version-control-aware workflows.

Common setup and health commands:

Tools/UCP/ucp.cmd doctor
Tools/UCP/ucp.cmd connect
Tools/UCP/ucp.cmd install
Tools/UCP/ucp.cmd bridge

Common usage examples:

Tools/UCP/ucp.cmd open
Tools/UCP/ucp.cmd compile
Tools/UCP/ucp.cmd logs
Tools/UCP/ucp.cmd run-tests
Tools/UCP/ucp.cmd screenshot
Tools/UCP/ucp.cmd scene --help
Tools/UCP/ucp.cmd object --help
Tools/UCP/ucp.cmd asset --help
Tools/UCP/ucp.cmd prefab --help
Tools/UCP/ucp.cmd build --help
Tools/UCP/ucp.cmd references --help

Useful global options:

Tools/UCP/ucp.cmd --project <project-path> doctor
Tools/UCP/ucp.cmd --json logs
Tools/UCP/ucp.cmd --timeout 120 compile

Use UCP when:

  • The task touches scenes, prefabs, assets, materials, packages, build settings, tests, profiler, or object/component data.
  • The task has multiple Unity Editor steps.
  • JSON output is useful for automation.
  • You need safer structured editor workflows instead of ad hoc C# probes.

Safety rules:

  • Do not modify scenes, prefabs, or serialized Unity assets if the editor state is dirty or unsafe.
  • Check tool health with doctor or connect when the bridge state is unclear.
  • Use --json when another script or agent needs stable machine-readable output.
  • If UCP is missing or cannot connect to the Unity bridge, report the exact blocker.

Tool Selection Rules

  • Use ripgrep first for searching files and text.
  • Use UnityCli for quick Unity checks and small editor actions.
  • Use UCP for structured or multi-step Unity workflows.
  • Prefer project-local tools over global installations.
  • Run commands from the project root when possible.
  • If a required local tool is missing, report the missing tool and path.

Unity C# Coding Standard

Project and Text Rules

  • This is a Unity 3D C# project.
  • Write code comments in English.
  • Keep all project text files encoded as UTF-8.
  • If a touched text file is ANSI/Windows-1252, convert it to UTF-8 before editing its content.
  • Prefer project-local tools over globally installed tools when a local tool exists.

Code Style

  • Prefer simple, direct, flat, readable Unity C#.
  • Keep code small and keep logic near the execution point.
  • Avoid unnecessary abstraction, indirection, utility layers, over-engineered managers, generic helper classes, and one-use helper methods.
  • Prefer explicit code over architecture created only for neatness.
  • Prefer direct if / if else logic at the call site over one-use condition helper methods.
  • Inline simple or one-use logic.
  • Small duplication is acceptable when it keeps the code easier to read.
  • Add methods only for large logic, reused logic, or clear business actions.
  • Do not extract null checks, simple boolean checks, one-line wrappers, trivial UI toggles, tiny formatting helpers, simple getters, save/load wrappers, or trivial conversions.
  • Do not use switch in any form: switch statements, switch expressions, pattern switches, or switch-like operators.
  • Use early returns only for errors, blockers, invalid input, or invalid state.
  • Keep normal success paths linear and easy to follow.

Unity Runtime Rules

  • Scenes should be composition surfaces only.
  • Do not put reusable runtime logic directly into scene-specific code.
  • Put project-specific app logic under Assets/scripts.
  • Put reusable systems and modules under Assets/Modules.
  • Reusable modules should not depend on project-specific app shell code.
  • WebGL template files should only contain host-page customization, not Unity runtime logic or business logic.

Workflow and Safety

  • Do not invent success when a compile, reimport, tool call, or source access is blocked.
  • If source access, authentication, permissions, or required tool capability is missing, stop and report the exact blocker.
  • Do not create duplicate temporary Unity project copies to bypass compile blocks, dirty scenes, or unsaved editor state.
  • Do not modify scenes, prefabs, or serialized Unity assets when the Unity editor state is unsafe or dirty.
  • Temporary editor scripts created only to modify scenes, prefabs, or serialized assets must be deleted after the edit unless they are real product code or the user asks to keep them.

I also recommend setting up a harness. In my opinion, the best approach is Karpathy’s LLM Wiki.
To migrate the project to Karpathy’s LLM Wiki pattern, run this prompt:

Apply Karpathy’s LLM Wiki pattern to this project.

Official source:
https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f

First, download the official Karpathy / LLM Wiki GitHub Gist file and save it inside the project here:

Docs/wiki/karpathy-llm-wiki.md

Use that file as the reference for building the project wiki.

The project wiki must live in the root-level Docs/wiki/.

Create and maintain a persistent project wiki in Markdown. Use it as long-term memory for the codebase, architecture, Unity systems, workflows, important decisions, bugs, fixes, and recurring project knowledge.

When you inspect the project, do not only answer the current question. Also update the wiki when you discover useful information. Keep pages short, linked, and practical. Add backlinks between related systems. Track contradictions, outdated assumptions, and important implementation details.

Suggested structure:

* Docs/wiki/index.md — main entry point
* Docs/wiki/log.md — chronological work log
* Docs/wiki/karpathy-llm-wiki.md — downloaded Karpathy LLM Wiki reference
* Docs/wiki/systems/ — Unity systems and features
* Docs/wiki/architecture/ — project structure and technical decisions
* Docs/wiki/workflows/ — build, test, deploy, debug workflows
* Docs/wiki/issues/ — known bugs, fixes, and investigations
* Docs/wiki/glossary.md — project terms and naming

Before working on a task, read the relevant wiki pages. After finishing, update the wiki with anything useful for future work.

For OpenAI Codex, put the project instructions into AGENTS.md.

What about using Gerty a a tool to connect to unity?