Forum Discussion
Anonymous
4 years agoScreen on/off detector ??
is it possible to detect when screen on/off [or when pressed power button] on unity?? [Quest 2]
Probably this page might help.
https://developer.oculus.com/documentation/unity/unity-lifecycle/
2 Replies
Replies have been turned off for this discussion
- korinVRExpert Protege
Probably this page might help.
https://developer.oculus.com/documentation/unity/unity-lifecycle/ The application lifecycle is indeed what you need but be careful as OnApplicationQuit() isn't always called. See this: https://forum.unity.com/threads/onapplicationquit-and-ondestroy-is-not-executed-when-exit-app-on-oculus-quest.795942/
For your requirements, OnApplicationPause() should do the trick
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 26 days ago
- 3 months ago
- 7 months ago