Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.3.X
Votes
12
Found in
2018.4
2019.4.2f1
2020.2
Issue ID
1261125
Regression
No
OnApplicationQuit method is called before Application.wantsToQuit event is raised
How to reproduce:
1. Open user's attached "quit_test 2019.4.zip" project
2. Open "SampleScene" Scene
3. Enter Play Mode
4. Exit Play Mode
5. Observe the Console log
Expected result: Application.wantsToQuit event is raised before OnApplicationQuit, if false is returned, no GameObjects are destroyed
Actual result: OnApplicationQuit is called before Application.wantsToQuit event is raised. Even if Application.wantsToQuitt returns false, most GameObjects are still destroyed in the OnApplicationQuit method because is called before the Application.wantsToQuit event
Reproducible with: 2018.4.24f1, 2019.4.3f1, 2020.1.0b15, 2020.2.0a17
Notes:
- The issue is also reproducible on Windows and Mac player, which can be seen in the Player log
- Added a video for reference showing the behavior with GameObjects being destroyed, even if Application.wantsToQuit is false
-
mayasarii876
Mar 08, 2022 10:07
http://103.56.148.201/
http://103.56.148.201/newmpo
http://103.56.148.201/mpo17
http://103.56.148.201/mpomm
http://103.56.148.201/mpotower
http://103.56.148.201/parisklub
http://103.56.148.201/juraganslot
http://103.56.148.201/mpo500
http://103.56.148.201/mpokick
http://103.56.148.201/mpoyes
http://103.56.148.201/xyzklub
http://103.56.148.201/betmpo
http://103.56.148.201/ogslot88
http://103.56.148.201/hoki777
http://103.56.148.201/mpojuta
http://103.56.148.201/299slot
http://103.56.148.201/mpo188
http://103.56.148.201/mpogacor
http://103.56.148.201/mpo300
http://103.56.148.201/rgo365
http://103.56.148.201/kingdom288
http://103.56.148.201/wigompo
http://103.56.148.201/mpo8899
http://103.56.148.201/mpopelangi
http://103.56.148.201/mpo555
http://103.56.148.201/dutampo
http://103.56.148.201/klik368
http://103.56.148.201/388hero
http://103.56.148.201/19dewa
http://103.56.148.201/mpoxl
http://103.56.148.201/mpoas
http://103.56.148.201/mposun
http://103.56.148.201/qqslot
http://103.56.148.201/mposport
http://103.56.148.201/dewa234
http://103.56.148.201/mesinmpo -
Baggers_
Jan 20, 2021 14:50
Can confirm this on 2020.2.0b11
Such a crazy bug, it makes wantsToQuit useless and means we need to modify all plugins that use OnApplicationQuit.How is this not considered a regression?
-
Palito_
Nov 13, 2020 17:31
Application.wantsToQuit does not work in editor, only in standalone.
-
jparedes90
Sep 28, 2020 06:28
I can confirm the issue. Looks like it stops working when you change to a different scene too.
-
ChaoFPS
Sep 01, 2020 12:01
I confirm the issue. Please fix this
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes when loading RenderDoc with Graphics API set to OpenGLES2 or OpenGLES3
- [Windows] Development Build with no scenes shows a purple screen when using OpenGLES3 graphics API
- Shader variants take too much memory at runtime
- [HDRP][VFX] Output mesh with default shader is incorrectly sorted before the HDRP fog
- Error "'GamepadSpeakerOutputType' does not exist in the namespace 'UnityEngine'" occurs in the Console when building a project
Resolution Note (fix version 2021.1):
Fixed in: 2021.2.0a4
Resolution Note (fix version 2021.1):
Fixed in: 2021.1.0b10
Resolution Note (fix version 2020.3):
Fixed in: 2020.3.1f1
Resolution Note (fix version 2019.4):
Fixed in: 2019.4.22f1