0 of 0

File information

Last updated

Original upload

Created by

SurDno and rathologic

Uploaded by

SurDno

Virus scan

Safe to use

Tags for this mod

About this mod

Fixes the exception resulting in game going unresponsive when trying to exit it from the pause menu. No more need for task manager.

Requirements
Permissions and credits
The issue was in the fact that the GameWindow class has Unity event OnDisable() which handles the behaviour when a particular game object is disabled, usually meant to clean up references, delegates, etc. However, it is being called both on the gameobject being disabled while the game is still running (i.e. UI element being hidden, which I assume is what IPL wrote the code for) and on the object being disabled as the entire scene is being unloaded (which happens when the game quits and allows devs to execute some code before the application closes, e.g. to save progress). It turned out to be quite easy to check for which one of the two reasons is the function being called and only execute the problematic code when it is just the UI being hidden, not the game closing.

The original research about why this happens belongs to rathologic, I only provided the solution to distinguish between the window being disabled during gameplay and when closing the game.