Unity MethodReload: Faster Iteration by Bypassing Domain Reload

  • PublicPublic
  • 22 Oct, 2026
Unity MethodReload: Faster Iteration by Bypassing Domain Reload

Unity has released MethodReload, an experimental package designed to eliminate the wait times associated with domain reloads during development. Traditionally, modifying gameplay code in the Editor forces a complete teardown and re-initialization of the Mono AppDomain, a process that can drain creative momentum. On devices, the situation is even more severe, as IL2CPP does not support domain reloads at all, requiring a full player rebuild for every change. MethodReload addresses this by allowing developers to update specific method bodies instantly, turning long compilation waits into a matter of seconds. This capability is now available for immediate use, aiming to streamline the iteration loop for both editor-based and on-device testing.

The package, currently at version 0.7.0-exp.1, is distributed within the com.unity.pipeline namespace and requires Unity 6.0 or later. To use this feature, developers must tag specific methods with the [MethodReload] attribute before entering Play Mode or building a player. This attribute must be present at compile time because the dispatch logic is woven directly into the method's bytecode. Only public instance or static methods that return void or IEnumerator are eligible for this treatment; any other signatures are skipped during the build process with a warning. This pre-compilation requirement ensures that the runtime can correctly identify which methods are candidates for live updates without interfering with the standard compilation pipeline.

Once the attributes are in place, the workflow involves starting the MethodReload Watcher, found in Project Settings under Pipeline and Editor. In the Editor, entering Play Mode activates the system, allowing any changes to tagged code to be compiled and injected in real time. For on-device testing, developers must build a development player with the runtime Pipeline driver enabled and connect via the Profiler or Console window. When a file containing a tagged method is saved, the Editor compiles it using the player's preprocessor defines and pushes the update to all connected devices. This process requires no restart of the application, enabling a seamless feedback loop. Additionally, Unity CLI commands are available for terminal-based workflows, allowing users to trigger reloads for specific files or folders directly from the command line.

Despite its speed advantages, MethodReload operates within strict limitations. It only modifies the bodies of tagged methods, leaving call sites, fields, and type layouts untouched. Consequently, developers cannot add new fields or classes through a reload. The interpreter executes a subset of C#, excluding certain complex features, though it supports primitives, loops, delegates, and coroutines. A Roslyn analyzer included in the package flags unsupported syntax in the IDE. On IL2CPP devices, the interpreter can only call APIs already referenced in the build; missing members will result in exceptions. Furthermore, interpreted code runs slower than compiled code, a trade-off that only affects development builds. Release builds do not include the interpreter, ensuring no performance impact in production.

Under the hood, MethodReload combines IL interpretation with compile-time weaving. Each tagged method contains a prologue that checks a registry for an available override. If an override exists, the interpreter executes the new IL bytecode; otherwise, the original compiled code runs. This architecture allows the interpreter to be compiled by IL2CPP alongside the rest of the game, enabling it to run on devices without external servers or open ports. While existing Asset Store tools offer full C# support in the Editor, they fail on IL2CPP builds. MethodReload fills this gap, providing a viable solution for on-device iteration. For developers whose pain points lie primarily in the Editor, existing tools may still be preferable, but for those targeting IL2CPP devices, MethodReload offers a unique and powerful path to faster development cycles.