Unity Lifecycle Messages
Hot Patch bridges common Unity MonoBehaviour messages so patched logic runs on live scene instances during Play Mode.
Supported messages
Awake, Start, OnEnable, OnDisable, OnDestroy Update, FixedUpdate, LateUpdate OnApplicationPause, OnApplicationFocus, OnApplicationQuit OnBecameVisible, OnBecameInvisible OnValidate, Reset, OnGUI OnDrawGizmos, OnDrawGizmosSelected OnMouseDown, OnMouseUp, OnMouseEnter, OnMouseExit, OnMouseOver, OnMouseDrag OnTriggerEnter, OnTriggerExit, OnTriggerStay OnCollisionEnter, OnCollisionExit, OnCollisionStay OnAnimatorMove, OnAnimatorIK
How bridging works
| Category | Messages | Behavior |
|---|---|---|
| Polled | Update, FixedUpdate, LateUpdate, OnGUI |
Hot Patch invokes the patched version every frame on all live instances. |
| Gizmo | OnDrawGizmos, OnDrawGizmosSelected |
Invoked during Scene view rendering. |
| One-shot | Awake, Start, OnEnable |
Bridged when the patch is registered for existing instances. |
| Event-driven | Collision, trigger, mouse, animator, lifecycle | Patched methods run when Unity fires the event on existing instances. |
Editing existing messages
If Update() already existed when you entered Play Mode, you can edit its body and see changes on the next frame. Same for Start, collision handlers, and other existing messages.
Adding new messages (not supported)
You cannot add a brand-new Update() (or any other Unity message) to a MonoBehaviour during Play Mode and expect Unity to start calling it. Unity registers message methods at domain load.
Hot Patch logs a warning:
New Update() on MyScript requires Unity recompile to receive engine callbacks.
Fix: Exit Play Mode so Unity recompiles, then re-enter Play Mode. Or edit an existing message method instead of adding a new one.