Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Application.quitting instead of MonoBehaviour.OnApplicationQuit #463

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Cluster7ck
Copy link

MonoBehaviour.OnApplicationQuit is called before Application.wantsToQuit
which leads to undesired behavior. Application.wantsToQuit can be used to
interrupt a quit process, so you can show the user a window ("do you really want to quit?").
If you cancel the quit, but MonoBehaviour.OnApplicationQuit executes anyways, stuff breaks.
I am aware this changes current behavior and is dealing with inconsistencies in the Unity API

`MonoBehaviour.OnApplicationQuit` is called before `Application.wantsToQuit`
which leads to undesired behavior. `Application.wantsToQuit` can be used to
interrupt a quit process, so you can show the user a window ("do you really want to quit?").
If you cancel the quit, but `MonoBehaviour.OnApplicationQuit` executes anyways, stuff breaks. 
I am aware this changes current behavior and is dealing with inconsistencies in the Unity API
Application.quitting instead of MonoBehaviour.OnApplicationQuit
@hneumann
Copy link

Can confirm. I still have the same issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants