Search Unity

  1. Get top assets for 50% off! Black Friday Sale 2021.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Oculus Quest / Oculus Go - VR / 2D Hybrid Apps?

Discussion in 'AR/VR (XR) Discussion' started by Chris_1001, Aug 17, 2019.

  1. Chris_1001

    Chris_1001

    Joined:
    Jan 16, 2018
    Posts:
    13
    Hi - has anyone managed to switch between XR and standard 2D mode on Oculus Quest / Go?

    Basically I need to be able to either start in 2D mode and switch into VR, or at least
    allow the app to know whether it has been launched as a VR or 2D app, so it can quit
    if it is launched from Oculus TV by mistake.

    Here's how it was done on google cardboard/daydream:
    https://developers.google.com/vr/develop/unity/guides/hybrid-apps

    I need to figure out how to do this for Oculus quest.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,682
    I don't understand. There are no hybrid apps for Go or Quest; they are always in VR mode. Aren't they?
     
  3. Chris_1001

    Chris_1001

    Joined:
    Jan 16, 2018
    Posts:
    13
    There definitely are - I've made a few.
    You make a "2D" app, i.e. an app with Virtual Reality SDK set as "None"
    These are launched from the Oculus TV launcher - where you find netflix / red bull tv etc..
    Unfortunately they will give you a black screen with no way to exit if you launch them from
    the regular "unknown sources" menu.

    These 2D apps are just like regular Android Apps - but in 16:9 aspect ratio on a virtual cinema screen.
    Let me know if I can provide any more info

    What I need to know is how to let my apps know how they were launched and set the VR sdk to "Oculus" or "none"

    If that's impossible - I need to find a way for the app to gracefully quit to avoid the black screen freeze.
     
    JoeStrout likes this.
  4. Chris_1001

    Chris_1001

    Joined:
    Jan 16, 2018
    Posts:
    13
    So... I hacked together a quick fix and it's not pretty..
    Quest VR screen width = 2880
    Quest Oculus TV 2D screen width = 1280
    So I made a script to check screen width on Start() and quit the app if it sees itself in the wrong environment.

    If anyone knows the "right" way - maybe with manifest or something I would love to know
     
unityunity