Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application.quitting instead of MonoBehaviour.OnApplicationQuit #1

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

Cluster7ck
Copy link
Owner

MonoBehaviour.OnApplicationQuit is called before Application.wantsToQuit fires
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
@Cluster7ck Cluster7ck merged commit 833edd1 into master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant