Game becomes unresponsive on exit
Checked through various methods but could not find the cause
-
No multithreading issues
-
No coroutine issues
-
Tried Application.wantsToQuit, same behavior
-
Not caused by Time.timeScale
Reproduction of the issue:
Case 1: In lobby, force quit (Alt+F4) or button exit (Application.Quit) works โ
Case 2: Lobby โ In-game, force quit works โ
Case 3: Lobby โ In-game โ Pause UI open, force quit or button exit unresponsive ๐ซ
Case 4: Lobby โ In-game โ Pause UI โ Return to lobby, force quit or button exit unresponsive ๐ซ
Case 5: Lobby โ In-game โ Pause UI โ Close UI, force quit works โ
Case 6: Lobby โ In-game โ Pause UI โ Return to lobby โ Back in-game โ Open UI, force quit or button exit unresponsive ๐ซ
Temporary workaround / solution:
Added AppTerminator
to fix the issue.
https://discussions.unity.com/t/bug-unity-6-build-game-process-continues-running-in-background-after-closing-window/1573387/16
Note: This bypasses Unity engineโs normal shutdown logic and forces immediate termination, so other side effects may occur (use as a last resort).