Hi!
I’m running a VR simulation in Unity using the Oculus Rift. I run this simulation in the Unity editor rather than building because the simulation stays in-house and does not need to be distributed. When the Rift goes from standby to active (when the sensor inside the headset is activated), the Unity window loses focus (presumably, focus is shifted to the Oculus app, although the app does not become unminimized and I have no way to verify this). This is specifically a problem for me because when Unity loses focus the Graphics Raycaster stops doing ray casts, which are necessary for my user interface (I’m using the OVRInputModule and OVRRaycaster which sits on top of the GraphicsRaycaster).
This was not happening a couple months ago. I can’t say exactly when it started, but I think it happened either with a Unity update or with an Oculus update.
This is extremely inconvenient for me, since I’m running user studies with multiple VR backpacks and I have to remote into the backpacks to control each Unity simulation. As each user puts on and takes off the HMDs, I have to remote into each and click on Unity to restore focus.
Does anyone know how to prevent this, how to automatically give Unity back focus, or how to get the Graphics Raycaster raycast method to continue being called even when Unity loses focus?
Thanks!