Product | Unity Code Agent | July 2026

Introducing Unity Code Agent

Unity Code Agent is an agent designed for long-running autonomous tasks inside the Unity Editor.

Tags: Unity, AI Agents, Open Source, Game Development

Repository

Unity Code Agent is now available as an open-source Unity package. It provides a coding agent inside the Editor with access to project files, Unity APIs, console output, tests, screenshots, and Play Mode controls.

The goal: let a developer assign a meaningful Unity task and receive both the implementation and evidence that it works.

Unity Editor and project access

Unity Code Agent can modify project files and execute C# with access to the Unity Editor API. It can perform any operation exposed by that API, including changes to scenes, GameObjects, components, assets, settings, and serialized references.

Combined with file editing and verification tools, this access lets the agent implement complex features that span UI, input, game logic, assets, and runtime behavior.

Tasks the agent can complete

Unity Code Agent can complete tasks of varying complexity, from modifying a MonoBehaviour or creating a GameObject in a scene to implementing complete game features. It can create scenes, prefabs, and MonoBehaviours; run tests; analyze screenshots; and play the game to verify the implementation—all autonomously.

Examples include:

Task example

The following task includes:

Create a Snake game. 
Target resolution: 1920x1080. Grid size: 32x32. The game should fill the screen.
Install TextMesh Pro assets.
Create a 32x32 white PNG sprite and use it for the visuals.
The snake should be light gray with a white head. Food should appear in a random bright color.
Use the new Input System for controls. Create new Input Actions for Up, Down, Left, and Right, bind them to the keyboard arrow keys, and use them.
Show the score at the top center. Show a Game Over screen with the score and allow the player to restart by pressing any key.
The snake should speed up by a configurable percentage after eating food. The amount of length added after eating food should also be configurable.
Follow Unity best practices for game development. Use the MVC pattern.
Verify the work using 'play unity game'. Verification should cover movement, eating food, snake growth, collision detection, scoring, and game-over conditions.

The quality of the selected model, the clarity of the request, and the complexity of the project affect the quality of the result. The agent has all the tools required to investigate and verify tasks through successful completion.

Verification in the Editor and Play Mode

Verification runs as part of implementation. The agent uses compiler errors, test results, Console messages, runtime values, and Game View output to evaluate each change. If a check fails, it can update the implementation and run the check again.

A vision-capable model can also analyze captured Game View screenshots.

Automated checks can catch broken references, startup exceptions, input regressions, incorrect state transitions, and visible configuration mistakes. Human playtesting remains responsible for feel, pacing, difficulty, accessibility, and overall quality.

Built-in Unity tools

Built-in tools connect the agent to the active Unity project. The agent can:

It uses these operations to inspect the project, apply changes, reproduce behavior, and verify the result.

Models and providers

Unity Code Agent supports:

Project-specific extensions

The built-in tools cover common Unity implementation and verification work, but every project has its own systems. Unity Code Agent provides three extension points:

Installation

Install from Unity Package Manager:

  1. Open Window > Package Manager.
  2. Select + > Add package from git URL....
  3. Enter:
https://github.com/Signal-Loop/UnityCodeAgent.git?path=Packages/com.signal-loop.unitycodeagent

Quickstart

Unity Code Agent supports two authentication/provider methods: BYOK and GitHub Copilot (free and paid).

BYOK

  1. Open Tools > UnityCodeAgent > Open Settings.
  2. In BYOK, set BaseUrl to the full HTTPS provider base URL and enter ApiKey. For example, https://openrouter.ai/api/v1 and sk-....
  3. In Model, click Refresh. On first run or after an update, Agent Service code is compiled and started in the background. This may take a few seconds.
  4. Select a model from the dropdown.
  5. Open Tools > UnityCodeAgent > Open Chat.
  6. Try a prompt such as List scene objects.

If no BYOK base URL is set, UnityCodeAgent uses the default GitHub Copilot authentication flow instead.

GitHub Copilot

  1. Sign in to GitHub Copilot on the machine before using the Unity package. Refer to the GitHub Copilot authentication guide for details.
  2. Open Tools > UnityCodeAgent > Open Settings.
  3. Leave BYOK > BaseUrl empty.
  4. In Model, click Refresh. On first run or after an update, Agent Service code is compiled and started in the background. This may take a few seconds.
  5. Select a model from the dropdown.
  6. Open Tools > UnityCodeAgent > Open Chat.
  7. Try a prompt such as List scene objects.

After changing authentication, provider settings, or model settings, use Tools > UnityCodeAgent > Restart Agent Service before refreshing models if the old service process is still running.

Unity Code Agent is available under the MIT license. Visit the GitHub repository for installation details, source code, issues, and contribution information, or read the v0.2 release notes.