Search Unity

Question Developing for both the Oculus Quest (standalone) and the SteamVR platforms in Unity 2020+

Discussion in 'VR' started by Wattosan, Sep 15, 2021.

  1. Wattosan

    Wattosan

    Joined:
    Mar 22, 2013
    Posts:
    460
    Hello,

    I was wondering how are you developing a single product for both the Oculus Quest/2 and the Rift/Vive/Index platforms?

    Do you use the OpenXR plugin and just activate support for the platforms via the XR Plug-in Management tool or do you separately import the Oculus and SteamVR assets from the Asset store?

    This question is for using Unity 2020+.

    Thank you!
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Via Unity XR / XR Management is the way to go for a project that works right now. I haven't tested OpenXR but I think its still relatively new in Unity land so if you find a bug there, please file a report.
     
  3. Dark-Table

    Dark-Table

    Joined:
    Nov 25, 2008
    Posts:
    315
    People have shipped PC VR apps using OpenXR, but I don't think there are any using OpenXR for Quest standalone apps (yet). Vermillion VR is using OpenXR and I assume they're going to use it for their Quest port, but it's not there yet. The Quest OpenXR runtime is still experimental, there are unimplemented features, deprecated features you might have been depending on, and many bugs. (I don't think Oculus is even accepting store submissions built with Quest OpenXR yet.)

    I've been watching the OpenXR posts in the Unity forums, Oculus developer forum, and Valve's forums, and there are people shipping apps, but there are also people panicing about 1 star reviews they're getting because of bugs and quirks in each OpenXR runtime. You have to deal with situations like someone using a Rift CV1 with the Steam OpenXR runtime having lockups. Then you have to explain to these people that *maybe* the problem will be solved if they switch their OpenXR runtime over to Oculus, but you don't know (Don't forget about explaining to consumers about the multiple OpenXR runtimes on their system and how/why you need to switch between them.). It's going to be a while (year+?) before OpenXR is the quick and easy option for shipping a cross-platform VR app.

    What I did was write an abstraction layer between XR input and game code. This way I can switch from using Oculus' OVRInput system on the Quest/Rift and Valve's SteamVR Input for Vive/Index/Window's Mixed Reality without game code knowing or caring. It works, but it takes a while to setup and test, and you need to learn how Steam's input system works. It's almost like the new Unity Input System, but *entirely* separate. Annoying.

    So, if I'm building for Oculus, I hide all the SteamVR_* directories, set the abstraction layer to "Oculus", and build for Quest and/or Rift. Then put back the SteamVR_* directories, hide the Oculus directory, set the abstraction layer to "SteamVR", and build for Steam.