The title is pretty much my whole question!
How can I tell if Steam/Oculus dashboard is shown with OpenXR?
I want/need to pause the game when the dash is shown.
Application.Focus doesn’t change when you bring up the steam dashboard, is there some other event I should look for or a callback that gets called?
I’m not sure how to do this with OpenXR as I’m still using the Oculus SDK, since I’ve heard OpenXR is still a bit sketchy, so I’m not sure if this helps you at all. I still have custom Steam and Oculus handling at the moment using #ifdefs everywhere.
To get the event when HMD focus is lost or user removes the HMD:
OVRManager.InputFocusLost += OnInputFocusLost;
OVRManager.HMDUnmounted += OnHMDUnmounted;
…and when user presses Oculus button (system UI), power button to turn off display, dismounting HMD and waiting 10 seconds or moving outside the Guardian boundary, then this method will be called:
private void OnApplicationPause(bool pause) { }
(you can also search Oculus SDK for this method usage, they use it in several of their samples, not to mention you will see “[OVRManager] OnApplicationPause(true/false)” messages in Unity console if you are using their SDK.
Thanks, but I’ve got it working with Oculus already; we have an OpenXR version of the game for all other platforms that I want to have the same behaviour.
You’re correct - OpenXR in Unity is a bit sketchy .