Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
31
Found in
2021.3.11f1
2022.3.0f1
2023.2.0a1
2023.3.0a3
Issue ID
UUM-18935
Regression
No
[Quest] Application.quitting does not get triggered on Oculus devices
Reproduction steps:
1. Open the user’s attached project
2. Build and Run using Android build platform
3. Observe the results via Quest 2
Expected result: Application.quitting event gets called as the Project launches and quits shortly after
Actual result: Application.quitting does not get triggered at all and the Project doesn’t quit by itself
Reproducible with: 2020.3.40f1, 2021.3.11f1, 2022.1.16f1, 2022.2.0b12, 2023.1.0a17
Reproducible on: Oculus (Quest 2), Android 10, CPU: Snapdragon XR2, GPU: Adreno (TM) 650
Not reproducible on: Google Pixel 3 (Pixel 3), CPU: Snapdragon 845, GPU: Adreno 630, OS: 12.0.0
Comments (1)
-
BigRedzz
Aug 31, 2023 18:13
3 years and this is still a thing?
We have kludged together a workaround using Meta's SDK but I don't understand why Unity is making us have to resort to such extremes...
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
We are marking this as "As Designed" due to some limitations of Android. Based on their lifecycle documentation, when the application is paused, the activity is no longer visible, meaning that the quitting event can't be listened for.
To work around this, there are a couple options:
The first option is to use OnApplicationFocus(bool), which is called when focus is lost, or gained.
The second option is to use OnApplicationPause(bool), which is called when pausing/unpausing.
Listening for these events and their bool arguments should give you similar functionality.
Since this limitation isn't clear, we will work to update the documentation to reflect this.
https://developer.android.com/guide/components/activities/activity-lifecycle
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationFocus.html
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationPause.html
Resolution Note (2023.3.X):
We are marking this as "As Designed" due to some limitations of Android. Based on their lifecycle documentation, when the application is paused, the activity is no longer visible, meaning that the quitting event can't be listened for.
To work around this, there are a couple options:
The first option is to use OnApplicationFocus(bool), which is called when focus is lost, or gained.
The second option is to use OnApplicationPause(bool), which is called when pausing/unpausing.
Listening for these events and their bool arguments should give you similar functionality.
Since this limitation isn't clear, we will work to update the documentation to reflect this.
https://developer.android.com/guide/components/activities/activity-lifecycle
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationFocus.html
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationPause.html