DivinityCodes
Hot Patch

Hot Patch

Edit C# directly from your IDE while Play Mode is running. See changes immediately, without waiting for Unity to recompile.

Key Benefits

  • Instant feedback: Patches apply in milliseconds, even on large projects.
  • Play Mode stays alive: No domain reload; coroutines, timers, and scene objects keep running.
  • IDE-first workflow: Works with Rider, Visual Studio, VS Code, or any editor that saves .cs files.
  • Zero project changes: No code attributes or build steps required to get started.
  • Transparent logging: The Hot Patch window shows exactly what was patched, skipped, or failed.
  • Editor-only by design: A debugging and iteration tool, not a production runtime dependency.

How It Works

  1. You enter Play Mode with Hot Patch enabled.
  2. Hot Patch blocks Unity's automatic script refresh so saves do not trigger a domain reload.
  3. When you save a .cs file, Hot Patch detects the change, compiles only what changed using Roslyn, and redirects method execution at runtime using Harmony.
  4. The next time your code runs Update, a button handler, or a utility method, it uses the new logic.

No external server. No project setup. Import the package, open the window, press Start, and edit.