5.3.1:Added support for VR Application Focus. All VR Players are now forced to Run in the background

Hello,

I am trying to debug networking by having a standalone Player running and editor player running. As soon as the editor player starts, the VR app no longer runs in background, it freezes. Stopping the editor resumes the standalone player.
I am unable to debug networking. The update states the editor should force the VR app to run in background, yet it doesn’t. What can I do?

I have “run in background” option checked in the player settings

This used to work in 5.3.0, though oculus would send the input to both instances of the game (editor and standalone player)

Thanks

Hi. It’s been a while. Can someone help me with this please?

Hey @Zadirion , The way in which Oculus VR focus works is that the Oculus runtime expects to only have one VR application rendering to the HMD. That application is the one that has VR Focus. So when Unity applications no longer have vr focus, they do very minimal work. The Same as if the app didn’t have runInBackground on and lost Windows Focus.

I can see how this is an issue for Testing and debugging Networking of two VR apps on a single machine. At the moment, using any version of Unity that supports VR Focus will prevent you from continuing your debugging. I’ll try to find a way to resolve this issue for a future release of Unity. I’m not sure the best solution for this at the moment as it may require work on both Oculus’s side and ours.

For the moment, all I can suggest is running the apps on two separate machines or reverting back to the version before VRFocus was introduced. I’ll keep this post updated if we find a solution.

1 Like

@Ed_unity
Thank you for the reply!
May I suggest a solution? The app that doesn’t have VR focus could switch any cameras rendering to HMD to render to the screen instead. In the meantime, no VR input and output is processed. Speaking from a user’s perspective, that was the expected behavior to begin with.

I’m having exactly the same problem and it makes it very hard to debug on a single machine. Even so if one running instance isn’t using VR mode at all. Please try to fix this asap as running between two computers for testing is highly inefficient.

You could easily solve this by checking if an application is already rendering to the HMD. If so you could still get the tracking data but only render to the local screen. Not sure about the architecture of the whole pipeline but in theory it shouldn’t be that complicated to implement.

Hello,

Unity appears to have stopped calling Update on my behaviors whenever OVRPlugin.userPresent is false.

This happens only in the player. The editor doesn’t doesn’t seem to check that boolean.
This is preventing work and needs to be fixed.

Give the developer the option to turn these features off for debugging purposes.
I don’t want to keep the headset on whenever I have to debug multiplayer. I’m not even putting it over my eyes because I need to debug code… I could tape over the sensor in the headset, but come on…

Thanks