# Best AI for Unreal Engine: C++, Blueprints and the Live Editor

The best AI for Unreal Engine is a strong agent model plus live editor access. How to pick the model and give it C++, Blueprints, RQL and Python.

_Last updated: 2026-11-23_

The best AI for Unreal Engine is not a single model. It is a capable agent model connected to the live Unreal Editor, so it can compile your C++, author and compile Blueprints, read and change the level, and check its work with screenshots instead of guessing from a chat window. In our experience the model matters less than that connection: pick Claude Opus 5.5 if money is no object, DeepSeek V4.1 Flash for the best price to quality, and give either one an MCP plugin with compact, efficient tools. This post explains what that looks like with AI Game Developer for Unreal (Unreal-MCP), how its RQL data layer and live code execution work, and how to choose and set everything up.

## Why Chat Alone Is Not Enough for Unreal

Unreal is a hard engine for an AI that only sees text. Several things get in the way:

- C++ in Unreal is not plain C++. Reflection macros, generated headers and module rules mean code that looks right often does not compile.
- Blueprints are binary assets. A chat model can describe nodes, but it cannot place them, wire pins or see compile errors.
- The level is live state. Which actors exist and what their properties are is not in any file the model can read.
- Feedback is the whole game. Without compiler diagnostics, Blueprint compile results and screenshots, the model cannot tell whether it succeeded.

So the question is really two questions: which model reasons well enough, and what tools let it act inside the editor. This post is mostly about the second, because that is where we see the largest difference in results.

## What the Best AI for Unreal Engine Needs

A useful checklist, whatever product you choose:

- A C++ compile loop that returns errors as file, line and severity.
- Real Blueprint authoring: variables, components, events, graph wiring, compile with structured errors.
- Data access to the level and assets in few calls.
- Code execution in the running editor for everything else.
- Screenshots the model can look at.
- Safety: undo, previews, limits per call.
- Freedom of client and model.

## How AI Game Developer Connects an Agent to Unreal

AI Game Developer for Unreal is a free editor plugin for Unreal Engine 5.5 to 5.8. The plugin is Apache-2.0; two bundled components, RQL and Code-Exec, use the PolyForm Shield 1.0.0 licence, which still lets you use everything to make and sell your games. It is on Fab and on GitHub, and it works with any MCP client: Claude Code, Codex, Cursor, GitHub Copilot, Gemini, Cline and others. It also powers the Unreal side of the AI Game Developer App, which has its own built-in agent (ai-game.dev/download).

The agent talks MCP to a server (the ai-game.dev cloud relay by default, or a local gamedev-mcp-server for offline work), which relays to a small sidecar program the plugin starts next to the editor. With a GitHub or CLI install you do not install anything extra: the sidecar is bundled for Windows, macOS and Linux. The Fab build carries no executables, so there you fetch the sidecar once from the editor.

The tools come in a few families:

- C++ source: read, scaffold a class, update, delete, list and compile project source.
- Blueprints: create, inspect, add components, variables, functions and events, set defaults, compile and spawn.
- RQL: one query language for actors, components, assets, levels, the editor state and logs.
- Python: run editor Python with the full unreal API.
- Screenshots: viewport, game view, camera and an isolated actor.
- Fab: search Fab, list your library, add owned content (covered in ai-game.dev/blog/asset-store-and-fab-for-ai-agents).

Optional extensions teach RQL about GAS, Niagara, PCG, Landscape and water, Control Rig, Enhanced Input and the experimental Mesh Terrain (all need UE 5.7 or newer, Mesh Terrain 5.8 or newer).

## C++: A Compile Loop the Agent Can Read

The C++ loop is the part that makes the biggest difference for C++ projects. The agent scaffolds a class with source-create-class, edits it with source-update and builds with source-compile. The compile uses Live Coding when it is active and UnrealBuildTool otherwise, and it returns every diagnostic with file, line and severity. When a change cannot be hot-reloaded, for example a new class or a changed UCLASS, UPROPERTY or UFUNCTION declaration, the tool says so and explains how to rebuild and restart, so the agent does not keep retrying a Live Coding patch that can never work.

File operations stay inside the project's Source folder. You can run the same build from a terminal without an open editor:

```bash
npx unreal-mcp-cli compile ./MyGame
```

A typical prompt: "Add an AHealthPickup actor class in C++ that heals the player on overlap, compile it and fix any errors."

## Blueprints: Authored, Wired and Compiled

For Blueprints the agent uses the blueprint tools to create a class, add components, variables, functions and events, set class defaults, compile and spawn it into the level. Compile results come back as a structured list of errors and warnings, with the node each message belongs to, which is the feedback loop a chat window never has.

Graph wiring goes through RQL. A Blueprint's event graph, functions and macros are queryable, and the agent can add nodes (function calls, variable getters and setters, events, casts, branches, loops), connect pins and set pin defaults. Connections go through the same checks as a drag between pins, and every change is undoable. Widget Blueprints work the same way: the agent can add widgets to the tree, set their layout and mark them as variables.

## RQL: One Query Instead of Thirty Tool Calls

RQL (Reflection Query Language) is our own query language for live object graphs, and it is the data layer of the Unreal plugin. Instead of a separate tool for "find actor", "get component", "set property" and so on, the agent asks one question in one pipeline and gets compact rows back:

```bash
actors | where Label contains "Enemy" | select $ref Label Location
actors | get Components | where $ is PointLightComponent | set Intensity = Intensity * 2
editor | call SpawnActor("PointLight", "Lamp", "(0, 0, 300)")
```

Filtering, sorting and aggregates run inside the editor, and only the rows that survive are sent to the model. In RQL's committed evaluation, with a DeepSeek V4.1 Flash agent on an 89-task catalog in a sandbox game world (three repeats), RQL tools reached 100% task success on the development split against 80.1% for conventional reflection tools (find, get object, set, call). The cost per successful task was about $0.00037 against $0.00693, roughly 19 times cheaper, with about 8.6 thousand tokens instead of 155 thousand per task and about 3.3 tool calls instead of 30. To be precise: that is a sandbox benchmark, not a run inside Unreal or Unity, and the method and caveats are in the RQL repository (github.com/IvanMurzak/RQL).

Changes are safe by design. An rql-mutate call is all or nothing, it is one undo step in the editor, it can be previewed with a dry run, and it is refused above 200 targets unless the call raises the limit.

The agent does not need RQL in its training data. rql-schema lists every source, type and member of the running editor, and the plugin writes an unreal-rql skill file for your agent that teaches the syntax with recipes. You can also use RQL yourself from a terminal; it starts a headless editor when none is running:

```bash
npx unreal-mcp-cli rql -p ./MyGame 'actors | where Label starts-with "Tree" | count'
npx unreal-mcp-cli rql -p ./MyGame 'editor | call SpawnActor("PointLight")'
```

More on the language: ai-game.dev/docs/rql.

## Code Execution: Python That Runs in the Live Editor

Fixed tools never cover everything, so the agent can also write code and run it immediately inside the running editor. In Unreal that code is Python: the python-execute tool runs a snippet with the full unreal API already imported, returns the last expression as the result and print output as logs, and points errors at the agent's own lines. A timeout (30 seconds by default) stops a runaway snippet without taking the editor down.

This is not an AI that saves a script file and asks you to run it. The code acts on the open editor right away and the agent sees the result in the same turn, so it can try an API, read the answer and adjust. The same approach, built on our shared Code-Exec library, runs C# in Unity, Godot and BRUTAL.

```bash
npx unreal-mcp-cli exec -p ./MyGame "unreal.SystemLibrary.get_engine_version()"
```

### Where RQL Reaches What Python Cannot

Python is powerful, but Unreal's Python API is built on the engine's reflection data, and a lot of editor data lives outside it. RQL's Unreal provider adds that data through the editor's own utilities. Confirmed examples from the plugin's documentation:

- Blueprint graph wiring is not exposed to Python. With RQL the agent adds nodes, connects pins and sets defaults through the same schema checks the graph editor uses.
- DataTable rows are not a reflected property. RQL reads, writes, adds, renames and removes rows the way the DataTable editor does.
- A Widget Blueprint's widget tree is not exposed by reflection. RQL lists, adds and edits the widgets.
- A user-defined struct keeps its fields outside reflection. RQL lists and changes them, and dependent DataTables and Blueprints update.
- In a World Partition level, actors outside the loaded regions are invisible to a normal query. RQL reports them, lists them from the actor descriptors and loads them by name or region. We added this after watching agents spend dozens of Python calls trying to find an unloaded lake.

In our experience the best split is simple: RQL for reading and changing editor data, Python for logic and APIs the tools do not cover, the C++ and Blueprint tools for code.

## Which Model to Pick for Unreal

The plugin works with any model your client supports, so this is a choice you can change any time. Our recommendations:

- If money is no object, use Claude Opus 5.5. In our view it is the best model available for this work, and it pays off most on long sessions with many C++ and Blueprint compile cycles.
- If you want the best price to quality, use DeepSeek V4.1 Flash: close to Opus in our experience at about 65 times lower cost, and the model we test our tools with on purpose. More in ai-game.dev/blog/best-ai-model-for-game-development.
- If you already use Claude Code, Codex or Cursor, keep it and connect the plugin.
- If you work offline or on a private project, use the local server mode: no account, traffic stays on localhost.

Efficient tools change the economics more than the model choice does. The same lesson came out of our CLI work (ai-game.dev/blog/cli-for-ai-agents-fewer-tokens); more on Flash in ai-game.dev/blog/deepseek-v4-1-flash-1017.

## What About Epic's Own AI Tools

Epic is moving in the same direction. As of November 2026, Unreal Engine 5.8 (released June 17, 2026) includes an experimental MCP server plugin that connects AI models to the editor, and at State of Unreal 2026 Epic said Unreal Engine 6 will integrate generative AI models such as Claude and Gemini, with early access expected around the end of 2027. What our plugin offers today, on UE 5.5 to 5.8, is a C++ compile loop, Blueprint and graph authoring, RQL with its measured efficiency, live Python, screenshots, Fab and the extensions above.

## Set It Up in Five Minutes

You need a C++ Unreal project (a Blueprint-only project becomes one when you add any C++ class from Tools, New C++ Class), and Node.js 22.14 or newer for the CLI. The Fab build needs no C++ project.

1. Install the plugin and open the editor.
2. Fab install only: in the editor open Tools, AI Game Developer, click Get bridge, extract the zip for your platform into the folder that Open bridge folder shows, then click Connect.
3. In the editor open Tools, AI Game Developer and click Authorize (Cloud), or switch to Custom and start the local server.
4. Under AI agent pick your client (Claude Code, Cursor, Codex and others) and click Configure.
5. Ask for something you can check: "Spawn three cubes in a row and a point light above them, then take a screenshot."

From a terminal, the CLI does the same (the remaining steps are at ai-game.dev/docs/quickstart):

```bash
npm install -g unreal-mcp-cli
unreal-mcp-cli install-plugin ./MyGame
unreal-mcp-cli login
```

Prefer one app with the agent, model choice and engine connection together? Install the AI Game Developer App from ai-game.dev/download.

## Honest Trade-offs

What works well and what to watch for:

- Better: C++ and Blueprint compile errors come back structured, so the agent fixes its own mistakes instead of handing you a log.
- Better: RQL makes data work cheap and fast, and every change is one undo step you can preview.
- Worse: changes to reflected C++ declarations still need a full build and an editor restart. The agent knows this, but it takes time.
- Worse: the plugin ships as source, so it needs a C++ project and a working C++ toolchain (the Fab build is precompiled, but you fetch the bridge program once by hand).
- Worse: every extension needs UE 5.7 or newer (Mesh Terrain 5.8), and Linux builds ship but are not covered by release tests.
- Keep in mind: an agent that runs Python and edits source can change a lot. Use version control and dry runs.

## Get Started

The best AI for Unreal Engine is the one that can see and change your project and check its own work without burning tokens. Pick your model, install the plugin and start with a small task you can verify in the viewport: ai-game.dev/engines/unreal.

## Related

- AI Game Developer for Unreal Engine: https://ai-game.dev/engines/unreal
- RQL query language: https://ai-game.dev/docs/rql
- Download the app: https://ai-game.dev/download
- CLI for AI agents, up to 83% fewer tokens: https://ai-game.dev/blog/cli-for-ai-agents-fewer-tokens
- Unity Asset Store and Unreal Fab for AI agents: https://ai-game.dev/blog/asset-store-and-fab-for-ai-agents
- DeepSeek V4.1 Flash (1017): https://ai-game.dev/blog/deepseek-v4-1-flash-1017

---

Source (HTML): https://ai-game.dev/blog/best-ai-for-unreal-engine
