Search Unity

Question What is the difference between Oculus XR Plugin and OpenXR Plugin?

Discussion in 'VR' started by YanivAvr, Dec 18, 2021.

  1. YanivAvr

    YanivAvr

    Joined:
    Feb 13, 2021
    Posts:
    11
    Hi,
    Can someone please tell me what is the difference between Oculus XR Plugin and OpenXR Plugin?
    Until now I used OpenXR Plugin and didn't find any usage for Oculus XR Plugin. does Oculus XR Plugin include everything that OpenXR Plugin has? Do I need both plugins?
    Thank you in advance.
     
    Last edited: Dec 18, 2021
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    OpenXR is a backend which can interact with almost all headsets. If you make your game on OpenXR it will run on Oculus, Vive/SteamVR, Index, mobile headsets like the Quest, WMR and more!
    If you don't need a specific feature of a package (on android the oculus package might be nice still), I highly recommend to just use OpenXR!
     
  3. YanivAvr

    YanivAvr

    Joined:
    Feb 13, 2021
    Posts:
    11
    Hi,
    I don't need cross-platform because I am developing for Quest 2 exclusively. So in that case, you think that Oculus XR Plugin is enough? With Oculus XR Plugin only, can I do everything that OpenXR can? What OpenXR Plugin has that Oculus XR Plugin doesn't? Also, they both have the same directory name when installed 'Assets\XR' which makes it feel like they don't need to be installed together in the same project.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    If you're just using the Quest (2) just using Oculus XR (under android tab) is fine!
    If you ever want to make a PC version, it is really easy and if inputs are correct you can simply enable OpenXR under desktop and setup controls.
     
  5. YanivAvr

    YanivAvr

    Joined:
    Feb 13, 2021
    Posts:
    11
    Thanks!
     
    DevDunk likes this.
  6. Kalennienna

    Kalennienna

    Joined:
    Jun 19, 2022
    Posts:
    12
    Brand new to this.... Have Oculus Quest 2. Finding the Unity tutorials on getting my headset set are too difficult. Have been trying to use YouTube videos, but I think almost all of them are outdated.... They are all older versions.... Which do you think will be easier for me to set up as a beginner, OpenXR or Oculus XR? I have made some basic scenes, and have used the tutorial to roll the ball. I'd like to try it on the headset... TY!
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Oculus XR is maybe easier, OpenXR together with XR IT is more flexible.

    You can follow the VR development path on Unity Learn
     
  8. Kalennienna

    Kalennienna

    Joined:
    Jun 19, 2022
    Posts:
    12
    Thank you!
     
  9. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    As of today, under XR Plug-in Management if you tick off OpenXR, Oculus disables and you can't enable it. Is this the proper course to provide support for both PCVR and Oculus support?
     
    NonPolynomialTim likes this.
  10. NonPolynomialTim

    NonPolynomialTim

    Joined:
    Sep 17, 2014
    Posts:
    7
    I also have the same question as @8bitgoose (and coincidentally on the same day it seems). Are we supposed to use OpenXR to build for both PCVR (Steam) and Oculus? Or are we supposed to add both plugins and then create loaders for them at runtime following the instructions here?
     
  11. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    For PCVR, definitely use OpenXR unless you cannot for reasons.
    For mobile, I have a seperate oculus build with the oculus xr plugin as well as an OpenXR build for pico headsets.
    You don't need to change the plugins in runtime, as almost all systems have cross platform input, especially if you use OpenXR
     
  12. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    So once I installed the Android support for Unity, I got another tab on the XR Plugins. There I can select Oculus for Android (Quest) and then OpenXR for PC.

    I definitely can't install both OpenXR and Oculus for both. So they are mutually exclusive. It seems like the whole industry is going OpenXR, so are there any reasons to go with Oculus only on Android?

    How do you do this? I can only either select OpenXR or Oculus in the XR Plug-in Management.
     
    Sabrina_A_ likes this.
  13. NonPolynomialTim

    NonPolynomialTim

    Joined:
    Sep 17, 2014
    Posts:
    7
    If (from what I understand from this thread) OpenXR will work on all of the major headsets (Vive, Index, Quest, Rift, etc.), then what's the benefit of having a separate Oculus build with the Oculus plugin?

    My original intent behind including both and selecting at runtime was to simplify automated builds, e.g. not having to write automation to change the loaders in the build pipeline. If, however, all major headsets can use OpenXR without any issue then I'll just use OpenXR for all of my automated builds.

    Thank you for your responses! They've all been very helpful for someone just taking the plunge into VR for the first time.

    Edit: I just saw 8bitgoose's response after I posted, sorry for the overlapping questions.
     
    hafizsaadcb likes this.
  14. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    @NonPolynomialTim Let me know what you find. I have been out of VR development for a while so I am not up to date on what is the best practice.

    Unity's own OpenXR support says that some features aren't working with OpenXR for Oculus and it is not recommended.

    Also love the other guys (from your profile picture). Gator needs his gat!
     
    DevDunk likes this.
  15. NonPolynomialTim

    NonPolynomialTim

    Joined:
    Sep 17, 2014
    Posts:
    7
    @8bitgoose according to this documentation, it looks like OpenXR > Oculus plugin. The section heading "Upgrading a project to use OpenXR" specifically tells you to, "In Project Settings > XR Plug-in Management, uncheck the plug-in provider(s) for your target device(s)," which I take to mean you don't need the Oculus plugin anymore, since Oculus is now supported by OpenXR.

    This video suggests the same conclusion as well.

    I'm always happy to meet another fan of The Other Guys! Pimps don't cry.
     
    hafizsaadcb likes this.
  16. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    @NonPolynomialTim Thanks for posting that video link, I was about to go chasing waterfalls.

    I am a little concerned that there is a disclaimer on that documentation that say says:

    Code (CSharp):
    1. Oculus Integration package features not available
    2.  
    3. Not yet recommended for production.
    I guess OpenXR isn't ready completely yet?
     
    ROBYER1 likes this.
  17. NonPolynomialTim

    NonPolynomialTim

    Joined:
    Sep 17, 2014
    Posts:
    7
    Sorry, I had hoped to reply sooner but I've got two jobs—I'm working here, and I got another job at Bed, Bath, and Beyond.
    That appears to be the case, but I dug a little deeper and followed a couple links in that documentation that took me to this blog post by Oculus VR. The interesting bit from the article says:
    That article seems to answer the original question of the thread: what is the difference between Oculus XR Plugin and OpenXR Plugin? OpenXR is the not-quite-finished successor to Oculus XR, and Oculus XR will be deprecated in the somewhat near future. Full deprecation is slated for early 2023 according to the blog post, but the other dates mentioned in the article have clearly slipped since its publication, so it is likely that full deprecation will happen much later than that.

    Hopefully that clears things up for you as much as it did for me.

    Aim for the bushes.
     
    Last edited: Nov 3, 2022
  18. 8bitgoose

    8bitgoose

    Joined:
    Dec 28, 2014
    Posts:
    448
    That's crazy. It wouldn't be because your are putting your kid through NYU, so he can explore his bisexuality and become a DJ?

    After creep creeping through the documentation it looks like OpenXR is the future. Had to install some packages to get the controllers working right and SteamVR now shuts off sending input to the controllers by default so that can cause some issues. I am glad everything is adhering to a standard now. Makes development a lot easier.

    Anyways I am off to a soup kitchen with Dirty Mike and the boys.
     
    NonPolynomialTim likes this.
  19. kblood

    kblood

    Joined:
    Jun 20, 2012
    Posts:
    92
    Nice that they hope to fully support OpenXR and move away from Oculus XR. For now though they still added face and eyetracking to Oculus XR first and OpenXR still lacks it. There is also hand tracking, which can be supported by OpenXR, but they havent yet. I hope they add all of this to OpenXR. That would make them better at competing with the Hololens with the Quest Pro f.ex. and adding handtracking to PCVR would also help the other Quest headsets.
     
  20. mghersi65

    mghersi65

    Joined:
    Jun 6, 2023
    Posts:
    1
    Hi, it's possible to run the OpenXR with MacOS ? I can Build and Run only with Oculus for the Quest 2 for debugging. Thanks.
     
  21. unity_4r1mCM-ae35u8Q

    unity_4r1mCM-ae35u8Q

    Joined:
    Mar 15, 2021
    Posts:
    1
    Can someone explain how to get the user's id from oculus on OpenXR? I am so confused about all of this too.
     
  22. hafizsaadcb

    hafizsaadcb

    Joined:
    Jan 15, 2024
    Posts:
    11
    can you plz share the official link for the below?
    Unity's own OpenXR support says that some features aren't working with OpenXR for Oculus and it is not recommended.