neuecc / UniRx

Reactive Extensions for Unity
MIT License
7.01k stars 895 forks source link

Application.quitting instead of MonoBehaviour.OnApplicationQuit #463

Open Cluster7ck opened 4 years ago

Cluster7ck commented 4 years ago

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

hneumann commented 3 years ago

Can confirm. I still have the same issue.