0

Hi2,

I am creating a VR Unity application for Oculus Quest.
And the application works perfectly fine.


Just a very simple and quick question;
How do I make the application stay active?
Because if I remove the headset, the Oculus Quest's display will turn off.
And after sometime the Application seems to quit by itself.

Therefore is there any Unity code to make the Oculus Quest stay active?

Edit: Adding the player setting enter image description here

Hikari
  • 458
  • 1
  • 11
  • 27

1 Answers1

0

In case you are using the Oculus camera rig you can try setting the OVRPlugin.ignoreVrFocus to true; this will always keep the Oculus enabled even when the headset is removed.

If that doesn't work make sure to select "Run In Background" under the Player settings > Resolution.

I hope this helps!

Lorenzo Goldoni
  • 555
  • 6
  • 22
  • thank you for your reply. Unfortunately in my player setting(i added the player setting screenshot) there is no "Run in Background" options. I do create a new Unity project and the option appear. however when i checked the "Virtual Reality Supported" in XR setting, the "Run in Background" is gone. – Hikari Mar 18 '20 at 13:58
  • As well., sorry for a bit of annoyance, could you show me a sample code on how to use OVRPlugin.ignoreVrFocus = true; ? – Hikari Mar 18 '20 at 13:59