Skip to content

Commit db586e0

Browse files
fix: memory leak without domain reload
playModeStateChanged never gets unsubscribed
1 parent f167039 commit db586e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,9 @@ private void OnDestroy()
13031303
{
13041304
Singleton = null;
13051305
}
1306+
#if UNITY_EDITOR
1307+
EditorApplication.playModeStateChanged -= ModeChanged;
1308+
#endif
13061309
}
13071310

13081311
// Command line options

0 commit comments

Comments
 (0)