Skip to content

Troubleshooting

My changes don't show up

  1. Save the file: Hot Patch reacts to disk writes, not unsaved IDE buffers.
  2. Hot Patch must be started: Press Start on the Home tab.
  3. You must be in Play Mode: Patching only applies during Play Mode.
  4. Re-invoke the method: Hot Patch does not re-run Start/Awake when you edit other methods. Change Update and wait a frame; change a click handler and click again.
  5. Check the activity log: The Home tab log shows saves, successes, warnings, and errors.
  6. Press Recompile: Forces a full re-apply from disk if a patch was silently skipped.

Hot Patch shows no patch after I saved

See Undetected changes. Common causes:

  • Edit was comments/whitespace only
  • File is in an Editor/ folder or excluded assembly
  • Change is unsupported (async, ref/out, new Unity message method)
  • Type is not loaded in the current domain

Fix: Press Recompile. If the log shows a specific skip reason, address that first.


"Scripts under an Editor folder are editor-only…"

Runtime MonoBehaviour scripts must live outside Editor/ folders. Move them to e.g. Assets/Scripts/.


"Type not available in the loaded domain"

The type was not loaded when Play Mode started, typically a brand-new .cs file created after entering Play Mode. Hot Patch can register new types dynamically, but the type must compile successfully. Check the log for compile errors.


"New Update() requires Unity recompile to receive engine callbacks"

You added a Unity message method that did not exist when Play Mode started. Unity only registers message methods at domain load.

Fix: Exit Play Mode (or press Recompile outside Play Mode) so Unity recompiles, then re-enter Play Mode.


"A domain reload started during Play Mode"

Something triggered a full script recompile during Play Mode, manual Refresh, Recompile outside Hot Patch, or a third-party tool. All runtime patches are cleared.

Fix: Ensure Hot Patch is started before entering Play Mode. Avoid manual Assets → Refresh or Recompile while testing. Disable IDE "Auto Refresh Assets in Unity" (Rider).


My changes only apply when I focus the Unity window

Unity pauses the Editor when unfocused unless Run In Background is enabled:

Edit → Project Settings → Player → Resolution and Presentation → Run In Background

Also enable Detect saves when Unity regains focus in Hot Patch Options.


Hot Patch takes a long time to detect my save

Hot Patch detects changes when the file is saved to disk.

IDE Setting
Rider Settings → Appearance & Behavior → System Settings → Save files when switching to a different application
VS Code File → Auto Save
Visual Studio Tools → Options → Environment → Preview Features → Autosave

Increase File save debounce in Options if your IDE writes files in multiple steps.


Unity recompiles every time I enter/exit Play Mode

Some third-party assets and Unity settings force recompilation on Play Mode transitions. Common causes:

  • Sprite Packer set to a mode that rebuilds on Play Mode
  • Editor scripts calling AssetDatabase.Refresh() on Play Mode change
  • Custom [InitializeOnLoad] code requesting compilation

Hot Patch's Recompile when exiting Play Mode option intentionally requests compilation after you've edited scripts. Disable it in Options if you want to control this manually.


Compile errors in the Hot Patch log

Hot Patch uses Roslyn with your project's assembly references. Compile errors mean the saved source is not valid C# in the current project context.

Fix: Fix the compile error in your IDE. The patch will apply on the next successful save.


InvokeOnHotPatch is not called

  1. Confirm Invoke [InvokeOnHotPatch] methods is enabled in Options
  2. Method must return void
  3. Parameters must be none, or a patch list type (IReadOnlyList<HotPatchMethodPatch>, etc.)
  4. Instance handlers only run on MonoBehaviour types with live scene instances
  5. Only successful patches trigger callbacks

High CPU usage during Play Mode

Lower Background poll interval in Options (e.g. 1.0s). Increase File save debounce if you see duplicate patch attempts.

On Windows, antivirus scanning of file watchers can increase CPU. Consider excluding your project folder from real-time scanning.


Changes don't auto-refresh after removing Hot Patch

Hot Patch blocks AssetDatabase auto-refresh during Play Mode and restores it on exit. If auto-refresh seems stuck:

  1. Exit Play Mode
  2. Check Edit → Preferences → Asset Pipeline → Auto Refresh is enabled
  3. Restart the Unity Editor

I need to report a bug

Open an issue on the Hot Patch Issue Tracker with:

  • Unity version
  • Hot Patch version (shown in the window header)
  • Steps to reproduce
  • Relevant log lines from the Hot Patch Home tab
  • The script change you attempted