diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 85ad8ff0f6..b817a0b6ea 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -13,6 +13,7 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Fixed +- Fixed memory leaks when domain reload is disabled. (#3427) - Fixed an exception being thrown when unregistering a custom message handler from within the registered callback. (#3417) ### Changed diff --git a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs index 2009de87bc..71ecce9498 100644 --- a/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs +++ b/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs @@ -1629,6 +1629,10 @@ private void OnDestroy() { Singleton = null; } + +#if UNITY_EDITOR + EditorApplication.playModeStateChanged -= ModeChanged; +#endif } // Command line options