Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In oculus browser not detect VR mode only AR Mode #56

Closed
BussinessInnovation opened this issue Oct 20, 2022 · 7 comments
Closed

In oculus browser not detect VR mode only AR Mode #56

BussinessInnovation opened this issue Oct 20, 2022 · 7 comments

Comments

@BussinessInnovation
Copy link

In oculus browser not detect VR mode, only detect AR Mode.

How can I force the VR mode on the Oculus Quest and keep the AR mode enabled on the smartphone?

thx!

@Rufus31415
Copy link
Owner

As mentioned here, AR takes priority over VR.
As Oculus now supports both, AR is chosen.

// In first approach, AR is prioritary over VR

@chismer
Copy link

chismer commented Oct 24, 2022

Ok. Thanks!
How could I force VR to be activated in the case of Oculus? From unity could?

@Rufus31415
Copy link
Owner

I suggest you replace the line with the following to force immersive-vr :

    navigator.xr.requestSession('immersive-vr', { optionalFeatures: ['local-floor', 'hand-tracking'] }).then(function (session) {

@chismer
Copy link

chismer commented Oct 24, 2022

Thank you! I have already changed it. I've saved, restarted Unity, compiled and it's still detecting AR. Do I have to do something to compile the jslib?

@Rufus31415
Copy link
Owner

You have nothing to do, the jslib is automatically included in the output binary.
Try deleting your output directory before starting a new compilation so that you dont have incremental compilation but a complete compilation.

@chismer
Copy link

chismer commented Oct 24, 2022

unfortunately it still detects AR.

@AdrianBotana
Copy link

I just tested this solution and it worked for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants