Live patching & C# hot-reload

Change C# without restarting the game.

Stopping Play Mode to test a one-line fix throws away everything it took to get there: the spawned enemies, the half-finished match, the bug you finally reproduced. Satura Space patches edited method bodies into the session that is already running.

The cost of a domain reload

The normal Unity loop for a code change is: stop Play Mode, wait for the compile, wait for the domain reload, press Play, then replay whatever sequence of actions got you to the interesting state. On a mid-size project that is a minute or two, every time. It is why so much game code gets tested by staring at it instead of running it.

That cost lands hardest when an AI coding agent is doing the editing. An agent can produce five candidate fixes in the time it takes you to verify one, and every verification pays the full restart tax, so the restarts end up setting the pace of the work.

What Satura Space does instead

When hot-reload is armed, Satura Space compiles the edited script and patches its method bodies into the running Mono domain. Unity never leaves Play Mode and never reloads the app domain, so nothing in the scene is torn down and rebuilt. The next time the patched method is called, usually on the next frame, the new code runs.

So you can tune a jump curve, fix an off-by-one in a damage calculation, or correct a netcode branch, and watch it change in a game that has been running the whole time. If the game is streamed into the app beside your agent's terminal, you see the result without touching the Unity editor.

What it covers

  • Method bodies in Assembly-CSharp, where your scripts live by default.
  • Method bodies in your own assembly definitions (asmdefs).
  • Method bodies in embedded packages under Packages/.
  • Edits made by you in the built-in editor, or by an agent writing files directly.

What still needs a normal recompile

  • New fields, new methods, new types. Changing a type's shape changes its layout, and live objects were already built to the old one.
  • Changed method signatures. Same reason: the patch replaces a body, not a declaration.
  • A patched Awake or Start on objects that already exist. Those methods ran before the patch landed; only objects spawned afterwards get the new version.
The honest limit: hot-reload is for iterating on logic you already have, not for writing new API surface. Adding a field is still a restart. Most of an agent's edit-verify cycle is tweaking bodies of methods that already exist, and that part gets fast.

Patching the live scene, not just the code

Through the Unity MCP exec bridge an agent can also run C# against the session that is running right now, spawning objects, changing component values and reading state back out. The demo above is an agent dropping 180 cubes into a game that never paused.

Exec runs in-memory through Roslyn, so calling it does not trigger a recompile or a domain reload either. An agent can query the scene, apply a change, and check the result inside one Play Mode session.

The specifics.

Unity version

Unity 6Mono scripting backend. Verified on 6000.5.4f1, 6000.3.6f1 and 6000.1.17f1.

Granularity

Method bodiesExisting methods in your own assemblies. Signature and type changes recompile.

State

Fully preservedNo domain reload, no Play Mode exit. Scene objects and connections survive.

Agent control

unity_arm_hot_reloadAn agent arms the same toggle the Player panel exposes.

Straight answers

Hot-reload questions.

What exactly can hot-reload change?

Method bodies, during Play Mode, on Unity 6 (Mono), in any of your own scripts: Assembly-CSharp, asmdefs and embedded packages. New fields, methods or types need a normal recompile.

Does it lose my scene state?

No. The session is never stopped and no domain reload happens, so every spawned object, open connection and in-memory value survives the patch.

Does a patched Awake or Start re-run?

No. Those already ran for objects that exist. A patched Awake or Start only affects objects spawned after the patch lands.

Does this work with IL2CPP?

No. Hot-reload needs the Mono scripting backend, which is what the editor runs. Your shipping IL2CPP builds are untouched; nothing here changes how you build a player.

Can an agent trigger it without me?

Yes. unity_arm_hot_reload is one of the Unity MCP tools, so an agent can edit a file and have the change land in the live session on its own.

Is this the same as Unity's Hot Reload asset?

The goal is similar, skipping the domain reload, but here it is one part of a workbench: the patched session is already streaming into the app next to the agent that wrote the change, with its console, its input and its clones attached.

Related

Stop restarting to test one line.

Patch the running game, keep the state, and let your agents do the same.

7-day free trial (no card required)macOS & Windows