<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NotNull</title>
    <description>The latest articles on DEV Community by NotNull (@notnull92).</description>
    <link>https://dev.to/notnull92</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3997785%2F4804468a-6b86-44a4-ac4c-34207d3b4b17.png</url>
      <title>DEV Community: NotNull</title>
      <link>https://dev.to/notnull92</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/notnull92"/>
    <language>en</language>
    <item>
      <title>Building a Lightweight Unity Editor Bridge for AI Coding Agents</title>
      <dc:creator>NotNull</dc:creator>
      <pubDate>Tue, 23 Jun 2026 02:10:56 +0000</pubDate>
      <link>https://dev.to/notnull92/building-a-lightweight-unity-editor-bridge-for-ai-coding-agents-1jm2</link>
      <guid>https://dev.to/notnull92/building-a-lightweight-unity-editor-bridge-for-ai-coding-agents-1jm2</guid>
      <description>&lt;p&gt;AI coding agents are getting better at writing code.&lt;/p&gt;

&lt;p&gt;But when I started using them seriously with Unity, I kept running into the same problem:&lt;/p&gt;

&lt;p&gt;They could edit C# files, but they could not reliably know what happened inside the Unity Editor.&lt;/p&gt;

&lt;p&gt;In Unity development, the file system is only part of the truth.&lt;/p&gt;

&lt;p&gt;The real questions are often:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did Unity compile the project?&lt;/li&gt;
&lt;li&gt;Are there Console errors?&lt;/li&gt;
&lt;li&gt;Which scene is active?&lt;/li&gt;
&lt;li&gt;Does this GameObject actually exist?&lt;/li&gt;
&lt;li&gt;Did the component value change in the Inspector?&lt;/li&gt;
&lt;li&gt;Can Play Mode start?&lt;/li&gt;
&lt;li&gt;Do the EditMode or PlayMode tests pass?&lt;/li&gt;
&lt;li&gt;If the agent changed UI, does it actually look right?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without access to the running Editor, an AI agent has to guess.&lt;/p&gt;

&lt;p&gt;That is why I started building &lt;strong&gt;hera-agent-unity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/NotNull92/hera-agent-unity" rel="noopener noreferrer"&gt;https://github.com/NotNull92/hera-agent-unity&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is hera-agent-unity?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;hera-agent-unity&lt;/code&gt; is an open-source Go CLI plus Unity Editor package.&lt;/p&gt;

&lt;p&gt;It lets AI coding agents talk to a running Unity Editor over localhost HTTP.&lt;/p&gt;

&lt;p&gt;The agent can call commands such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hera-agent-unity status
hera-agent-unity console &lt;span class="nt"&gt;--type&lt;/span&gt; error &lt;span class="nt"&gt;--lines&lt;/span&gt; 20
hera-agent-unity scene info
hera-agent-unity editor play &lt;span class="nt"&gt;--wait&lt;/span&gt;
hera-agent-unity &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--mode&lt;/span&gt; PlayMode
hera-agent-unity find_gameobjects &lt;span class="nt"&gt;--ids&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can also execute C# inside the Editor:&lt;br&gt;
hera-agent-unity exec 'return UnityEditor.EditorSceneManager.GetActiveScene().name;'&lt;br&gt;
The goal is not to make AI “magically understand Unity.”&lt;br&gt;
The goal is more practical:&lt;br&gt;
Let the agent edit the project, ask the real Unity Editor what happened, fix problems, and verify again before saying done.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why not just use MCP?
&lt;/h3&gt;

&lt;p&gt;MCP is useful. I am not against it.&lt;br&gt;
But for this project, I intentionally chose a CLI-first design.&lt;br&gt;
The reason is that Unity Editor automation has a very specific workflow.&lt;br&gt;
Most of the time, I do not need a general tool protocol, server negotiation, or large structured responses.&lt;br&gt;
I need a coding agent to ask small, repeatable questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is the Editor ready?&lt;/li&gt;
&lt;li&gt;Did the project compile?&lt;/li&gt;
&lt;li&gt;Are there recent Console errors?&lt;/li&gt;
&lt;li&gt;What objects exist in the scene?&lt;/li&gt;
&lt;li&gt;Can Play Mode start?&lt;/li&gt;
&lt;li&gt;Did my change actually apply?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For that loop, response size matters.&lt;br&gt;
AI agents are limited by context, latency, and cost. If every Editor operation returns a huge object graph or verbose schema, the tool becomes less practical to use repeatedly.&lt;br&gt;
So Hera is designed around compact commands.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;list --compact&lt;/code&gt; is around 93 tokens&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;find_gameobjects --ids&lt;/code&gt; is around 49-55 tokens&lt;/li&gt;
&lt;li&gt;side-effecting commands usually return just &lt;code&gt;OK&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That may sound small, but it changes the workflow.&lt;br&gt;
If a command is cheap enough, the agent can call it often.&lt;br&gt;
That means the agent can verify instead of guess.&lt;/p&gt;
&lt;h3&gt;
  
  
  The workflow I wanted
&lt;/h3&gt;

&lt;p&gt;The workflow I wanted looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI agent edits Unity code
        ↓
asks the real Editor what happened
        ↓
checks compile / Console / scene state
        ↓
fixes errors
        ↓
verifies again
        ↓
only then says done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is especially important for Unity because many errors do not appear as ordinary compiler feedback inside the text editor.&lt;br&gt;
A script may compile, but the scene may still be wrong.&lt;br&gt;
A prefab may exist, but the Inspector value may not be what the agent intended.&lt;br&gt;
A UI may be technically created, but visually broken.&lt;br&gt;
A Play Mode issue may only appear when the Editor actually runs.&lt;/p&gt;
&lt;h3&gt;
  
  
  Agent-specific rules
&lt;/h3&gt;

&lt;p&gt;Another part of the project is agent rule generation.&lt;/p&gt;

&lt;p&gt;Hera can generate project rules for tools such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codex&lt;/li&gt;
&lt;li&gt;Claude&lt;/li&gt;
&lt;li&gt;Cursor&lt;/li&gt;
&lt;li&gt;GitHub Copilot&lt;/li&gt;
&lt;li&gt;Google AntiGravity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The idea is simple.&lt;br&gt;
When an AI coding agent enters the project, it should immediately know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which Hera commands to use&lt;/li&gt;
&lt;li&gt;how to inspect Unity state&lt;/li&gt;
&lt;li&gt;how to avoid returning huge Unity objects&lt;/li&gt;
&lt;li&gt;how to read Console errors&lt;/li&gt;
&lt;li&gt;how to verify before claiming completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, instead of returning a full GameObject or Transform, the rules push the agent to return compact identifiers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;var go &lt;span class="o"&gt;=&lt;/span&gt; GameObject.Find&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Player"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;return &lt;/span&gt;new &lt;span class="o"&gt;{&lt;/span&gt; name &lt;span class="o"&gt;=&lt;/span&gt; go.name, instanceID &lt;span class="o"&gt;=&lt;/span&gt; go.GetInstanceID&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Small details like this matter a lot when the tool output becomes part of the agent context.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ultra Hera
&lt;/h3&gt;

&lt;p&gt;The newest feature I added is called Ultra Hera.&lt;br&gt;
It is a verification workflow for AI-assisted Unity work.&lt;br&gt;
It does not do the AI work by itself. Instead, it tells the agent how carefully to check its Unity work after using Hera.&lt;br&gt;
There are two main modes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Light Mode
&lt;/h3&gt;

&lt;p&gt;Light Mode is the default.&lt;/p&gt;

&lt;p&gt;It nudges the agent to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;confirm the goal&lt;/li&gt;
&lt;li&gt;read only the needed Unity state&lt;/li&gt;
&lt;li&gt;make the change&lt;/li&gt;
&lt;li&gt;verify compile or state&lt;/li&gt;
&lt;li&gt;check recent Console errors&lt;/li&gt;
&lt;li&gt;re-read only the changed target&lt;/li&gt;
&lt;li&gt;retry once or twice if needed&lt;/li&gt;
&lt;li&gt;report short evidence&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is meant for normal Unity coding, Editor, and Inspector tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ultra Mode
&lt;/h3&gt;

&lt;p&gt;Ultra Mode is for stricter requests.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
“play it and confirm”&lt;br&gt;
“check the Inspector too”&lt;br&gt;
“match this UI”&lt;br&gt;
“run the tests”&lt;br&gt;
“verify this exactly”&lt;/p&gt;

&lt;p&gt;In those cases, the workflow can escalate to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Play Mode checks&lt;/li&gt;
&lt;li&gt;EditMode or PlayMode tests&lt;/li&gt;
&lt;li&gt;screenshot capture&lt;/li&gt;
&lt;li&gt;UI capture&lt;/li&gt;
&lt;li&gt;deeper Inspector or asset state checks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is not to make every task heavy.&lt;br&gt;
The point is to match the verification depth to the risk of the task.&lt;/p&gt;

&lt;h3&gt;
  
  
  UI Juicy Mode
&lt;/h3&gt;

&lt;p&gt;One of my favorite parts is &lt;strong&gt;UI Juicy Mode&lt;/strong&gt;.&lt;br&gt;
AI-generated UI often works, but feels static.&lt;br&gt;
It can place buttons, panels, and labels, but it may forget the game-feel layer that makes UI feel alive.&lt;br&gt;
When UI Juicy Mode is enabled, Hera can send game-feel recipes to the agent through agent_hint.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;button hover feedback&lt;/li&gt;
&lt;li&gt;press squash&lt;/li&gt;
&lt;li&gt;release bounce&lt;/li&gt;
&lt;li&gt;popup overshoot&lt;/li&gt;
&lt;li&gt;damage text motion&lt;/li&gt;
&lt;li&gt;progress bar feedback&lt;/li&gt;
&lt;li&gt;lightweight animation suggestions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the agent does not stop at placing UI elements.&lt;br&gt;
It gets nudged toward making UI that feels more like game UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unity version support
&lt;/h3&gt;

&lt;p&gt;I also spent time checking Unity versions separately.&lt;br&gt;
So far I have verified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unity 2022.3 LTS&lt;/li&gt;
&lt;li&gt;Unity 2023.2&lt;/li&gt;
&lt;li&gt;Unity 6.3&lt;/li&gt;
&lt;li&gt;Unity 6.5&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dogfooding
&lt;/h3&gt;

&lt;p&gt;I am dogfooding Hera while building my personal Unity game project, NoMoreRolls.&lt;br&gt;
The README includes a Play Mode preview, because I wanted to show the tool being used in an actual Unity workflow rather than only as a command list.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I learned
&lt;/h3&gt;

&lt;p&gt;The biggest lesson from building this is that AI-assisted development is not just about code generation.&lt;br&gt;
For real projects, the more important question is:&lt;br&gt;
&lt;code&gt;Can the AI safely operate inside the actual product environment?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For Unity, that means the Editor.&lt;br&gt;
For web apps, it might mean the browser.&lt;br&gt;
For backend systems, it might mean logs, tests, local services, databases, or deployment previews.&lt;br&gt;
The pattern is the same:&lt;br&gt;
The AI should not only write changes.&lt;br&gt;
It should be able to observe the system, verify the result, and correct itself.&lt;br&gt;
That is the direction I am exploring with hera-agent-unity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Repository
&lt;/h3&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/NotNull92/hera-agent-unity" rel="noopener noreferrer"&gt;https://github.com/NotNull92/hera-agent-unity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would appreciate feedback from Unity developers, game tooling developers, and people building AI agent workflows.&lt;br&gt;
Some questions I am especially interested in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Would you prefer this kind of Unity bridge as a CLI, MCP server, Unity window, or a combination?&lt;/li&gt;
&lt;li&gt;What Unity Editor commands would be most useful for AI agents?&lt;/li&gt;
&lt;li&gt;How much verification should an AI agent do before saying a Unity task is complete?&lt;/li&gt;
&lt;li&gt;Are there other engine workflows where agents need direct editor/runtime access instead of only file access?&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
