Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Resolved New XR Management and Vendor plugins

Discussion in 'AR/VR (XR) Discussion' started by FlightOfOne, May 26, 2020.

Thread Status:
Not open for further replies.
  1. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    Hi,

    I have a question regarding vendor plugins and XR.

    Do I need to install each vendor plugin (e.g. WMR plug in and Oculus XR plugin) or can I just install one and publish to all other platforms? In other words can I use Oculus XR plugin and play on a Valve device (e.g. Index), and vise versa?


    Here is the XR framework:https://docs.unity3d.com/Manual/XRPluginArchitecture.html

    Thanks!
     
    Last edited: May 26, 2020
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    You will have to ask Valve about what restrictions they put on their store in regards to what you can publish there. Same goes for every other store as they all have their own restrictions and requirements for publishing.

    But my guess would be no.
     
  3. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    Thanks and sorry I should asked differently (edited my original question). Yeah, I am aware of the publish part of things and each store restrictions. I should have said play, not publish.

    Like lets say, I use Oculus XR plugin and publish on the Oculus store (no problems here, play with an oculus headset should be able to play). But what about if there is a play with a Valve index trying to play the same game (on Oculus store of course) will that person have issues, is my question.

    I ask this because before XR management, if I were to use something like OVR or OpenVR plugin, I can do what I described above just fine. Now with the new framework has this changed?
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    I am still not quite clear on the issue here. I don't see how OVR will run an HTC Index directly. I would think that you would still need to use the SteamVR plugin added to your project to be able to handle that.
     
  5. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    I published an app using SteamVR plugin, no OVR whatsoever, and people with WMR, Oculus and Valve, all were able to play because SteamVR managed this (how? guess they had drivers for this? beyond my knowledge). I believe if you used the Oculus integration (I have limited experience with this) it did the same thing as Steam plug in.

    I was under the assumption that XR management was supposed to take care of this part now, act like a central management system for all the devices, with the help of XR plugins from the vendor, is this correct?
     
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    XR Management does not change how this all works in relation to built in XR. You still need to use and manage provider plugins for each store/device/etc. you want to run on/publish to.

    Valve has put a lot of effort in making SteamVR work with WMR and OVR by writing wrappers around those systems so they look and work with Steam VR. This is why you can use Steam VR and have it run on all other devices. This has nothing to do with Unity XR support, either Built In or XR Plugin based.

    I have no information in regards to if Oculus drivers are setup to make Steam VR look like an Oculus device or not, nor WMR. My best guess is no but honestly I don't know.
     
    a436t4ataf likes this.
  7. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
    I'm also confused by XR management.

    Currently, I'm making VR apps based on Steam VR. It works on my Vive and is compatible with other headsets like my WMR. In my experience, this is as far we can go to make a .exe that will run with any VR headset.

    I was hoping we'd get some kind of universal VR standard by now and that XR would go in that direction. Instead, anything I tried with XR management didn't work with my Vive. Worse, I wanted to try the 2020 beta and OpenVR is deprecated so SteamVR doesn't work either.

    Is there and alternative?

    Is there a reason we don't get SteamVR in XR management?

    Thanks
     
  8. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    Marc-Saubion likes this.
  9. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    I have been messing with the new interaction system and I am able to see the VR controllers under unsupported so Unity Definitely can see these devices without any plugins. But I probably won't rely on this for a production app.

    I am able to use this for Valve stuff (same as what @joejo posted), WMR and Oculus packages are there in the package manger already.
    https://github.com/ValveSoftware/steamvr_unity_plugin/tree/UnityXRPlugin

    Watch the first part of this video, it might help you understand better:

    Also, this guy has very good how to video:


    I recently published an app and most of the complaints had to do around input/compatibility. Troubleshooting these has been an absolute nightmare. Problem is we still have no real standard when it comes to VR, everyone wants to be the leader and doing their own thing. We have Valve in on corner, WMR and Oculus in the other and they are all trying to compete (my personal opinion) and we are caught in the middle. You can say what you want about WMR, but this has been the easiest to work with as a developer. I wish everyone adopted one framework (e.g. WMR) and built their hardware on top of that. VR world would be a happier, stable and a thriving place. That was my little rant.

    Anyways, looks like the pain train will continue for the foreseeable future and I hope I am wrong.
     
    Last edited: May 28, 2020
  10. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    > Problem is we still have no real standard when it comes to VR, everyone wants to be the leader and doing their own thing.

    This, unfortunately. Hoping that OpenXR remedies this situation in some way in the near future.
     
    ROBYER1 and FlightOfOne like this.
  11. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
    Thanks. I tried it already but the package manager doesn't want it.

    Does anybody have the right git url to put in the package manager? I tried everything and don't know what I'm missing.

    Thanks
     
  12. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    What URL are you using?
     
  13. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
  14. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
  15. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    816
    None of those are correct as per the README in the GitHUB repo they point to.
     
  16. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
    Last edited: May 28, 2020
  17. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
    Yeah I see that now. I was working using Unity's documentation that shows adding packages from git with the ".git". That was a misleading direction.

    Thanks again for your help.
     
  18. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    URL works fine. You just need to have Git installed on your PC, Note that it is NOT git desktop or source tree, you need actual git (Git-2.26.2-64-bit) installed. If you do not want to do this, you can download it to your desktop (from link below) and from the package manager select "Add package from disk".

    From valve:

    Unity XR Input (SteamVR Legacy Input):
    • Go to the package manager window (Window Menu -> Package Manager)
    • Hit the + button in the upper left hand corner
    • Select “Add package from git URL”
    • Paste in: https://github.com/ValveSoftware/steamvr_unity_plugin.git#UnityXRPlugin
    • Open the XR Management UI (Edit Menu -> Project Settings -> XR Plugin Management)
    • Click the checkbox next to OpenVR Loader - or in older versions - Under Plugin Providers hit the + icon and add “Open VR Loader”
     
    Marc-Saubion likes this.
  19. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    @joejo

    Could you please tell me what the proper workflow is for getting WMR, Valve and Oculus to work on the same build? I have been digging (perhaps at the wrong places) and can't really seem to find much on this.

    Do I check all the XR plugins and hit play, is XR supposed to figure out which devices is connected and work accordingly? I did this but I get errors. Do I need to do something else?

    xr wmr valve oculus.PNG

    Afterwards this pops up and sits there.

    building.PNG
     
    Last edited: May 29, 2020
  20. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
    That's what I hope for.

    I have a Vive and a WMR. I'll check if my test app runs on the WMR without running steam vr as i currently have to do.
     
  21. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    456
  22. salvolannister

    salvolannister

    Joined:
    Jan 3, 2019
    Posts:
    29
    Last edited: Jun 25, 2020
  23. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    Hi, Your link is not working but I think this is the full plugin. Yes this one will work because it supports everything from HTC to wmr through that plugin and you do not need to use the new XR management with this. My case it even worked for cosmos after I added the poses.

    We are trying to use the Steam's Unity XR plugin that's supposed to be used with XR management as a subsystem. https://github.com/ValveSoftware/steamvr_unity_plugin/tree/UnityXRPlugin

    I have been playing with a lot since I initially posted this. It seems you have enable XR plugins you need (Oculus, steam etc..) and use a custom initialize script (vs checking auto) to fire them up on demand.
     
  24. salvolannister

    salvolannister

    Joined:
    Jan 3, 2019
    Posts:
    29

    I am not using the complete version of SteamVR plugin but the OpenVR XR SDK Package with XR Management and XR Interaction Toolkit. The problem I have with the hand goes out of this topic ( Yesterday I didn't know before posting), and it is due to the OvrAvatar from Oculus SDK.
     
  25. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,037
    With SteamVR now starting to focus on using OpenXR rather than OpenVR moving forward, who is responsible for an OpenXR plugin in Unity, will Valve have to make it or will Unity? Who will own that plugin?

    With SteamVR using OpenXR in beta and also Oculus Quest/Rift getting OpenXR support, it seems increasingly clear that OpenXR should be the clear cross-platform solution soon.
     
  26. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    I really wish supported of all VR systems, at least the popular ones, just as they created support for all the input devices with the new input system (which has been nothing short of amazing). Only problem is it would be nightmare as far as maintaining it with hardware/firmware changes, especially since VR is changing at such rapid rate. I think vendors need to step up their game as far as supporting game engines or just use one solution (which is highly unlikely and probably easier said than done).

    As far as I understand it, open xr is the base that everyone uses. It is a collaborative effort and was created as an open source by bunch of people in the industry which may have included people from Microsoft, Valve and Oculus. Then all the companies started using this as their base system.

    https://www.khronos.org/about/directors-officers/
    https://www.khronos.org/openxr/
     
  27. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,037
    [QUOTE="FlightOfOne, post: 6026327, member: 665294"
    https://www.khronos.org/openxr/[/QUOTE]

    From this page you linked, you can see Unity is still using the left diagram with XR Plugin Management, where the plugins like Oculus, Windows MR etc are all individually added through XR Plugin Management rather than the right diagram where the Unity build target should be just OpenXR. I don't know how we will get there with Unity's current direction but Unreal engine has done it already.

    upload_2020-6-26_15-47-23.png
     
  28. firestorm185

    firestorm185

    Joined:
    Sep 23, 2014
    Posts:
    20
    Yeah, it's collaborative. The issue we're seeing in this thread is that Valve hasn't released a non-beta branch of their part of the UnityXR plugin, so currently the system only works with WMR and Oculus. Once they do, and Unity adds it by default to their list of supported systems, then it should work like butter, it's just waiting for Valve to finish their plugin that's the annoying part.
     
  29. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    From this page you linked, you can see Unity is still using the left diagram with XR Plugin Management, where the plugins like Oculus, Windows MR etc are all individually added through XR Plugin Management rather than the right diagram where the Unity build target should be just OpenXR. I don't know how we will get there with Unity's current direction but Unreal engine has done it already.
    [/QUOTE]

    Open XR seem hopeful but they (Unity, valve, Oculus, Microsoft and even Unreal) need to figure out and agree on how this is going to work out for the foreseeable future, come up with a formal standard for this. Otherwise this going to hurt or slow down the progress of VR. Also, it is hurting small/indie groups the most and the irony is they (of course Oculus, which was also sort of an indie company back then, Unity and also Valve which did a good amount should get half the credit) were the ones that pushed VR this far. Now the big companies are coming to the game after seeing all the potential and they don't really care for this as they have resources to hire a dedicated person or a team to JUST deal with VR/hardware aspects of a game.
     
    Last edited: Jun 28, 2020
  30. datagreed

    datagreed

    Joined:
    Sep 17, 2018
    Posts:
    37
    ROBYER1 likes this.
  31. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    also keep in mind at if you were using Unity's new input and you upgrade to this, it will break your input.

    see here:
    https://github.com/ValveSoftware/unity-xr-plugin/issues/29

    And if you have figured something out or have new information regarding this please do share.
     
    Marc-Saubion likes this.
  32. EntertainmentEnterprise

    EntertainmentEnterprise

    Joined:
    Aug 22, 2018
    Posts:
    18
    Just a quick tip I've always used. VRTK handles all these issues. The camera rig accepts oculus, wmr, steam vr, etc, and has a script to determine which headset is plugged in, and switched accordingly. Works flawlessly last time I checked. I am reimplementing it into a new project now with the newest build of VRTK on Git.

    Granted, the OpenXR solution should make this way easier at some point in the future, but until then this is the method I will continue to use.

    I'm not sure if it's going to work with the XR plugin for Oculuw, so I may have to disable that and return to package from Oculus themselves. We shall see. I will update when I test more, but I'm confident this will be the best way until all platforms are integrated with XR Management.
     
  33. FlightOfOne

    FlightOfOne

    Joined:
    Aug 1, 2014
    Posts:
    400
    It is probably a great tool and may work for most general project, but my whole reasoning behind moving to XR is to get away from third-party tools (including SteamVR suite, Old SteamVR also works great for generic projects) as they tend to not scale well as the project/scope changes. Also it is a nightmare when it comes to troubleshooting.

    More I learn about XR better it seem to be. I think whats killing it is lack of documentations and tutorials.
     
    Last edited: Sep 17, 2020
  34. EntertainmentEnterprise

    EntertainmentEnterprise

    Joined:
    Aug 22, 2018
    Posts:
    18
    I should have gonna back and deleted that post. XR Management is absolutely the way to go , no if ands or buts about it . I agree with you completely. Also, I have a method to get the steam vr xr stuff to work as well, as I have had a long conversation with Vive about it. So basically, install Vive Input Utility 1.12 after installing the XR Management and Oculus XR stuff. You will have to find the asset package from them as 1.11 is on the store and hasnt been updated there. Once you've done this, you can go to Preferences->VIU and check openvr, this will allow you to install the latest, and first non preview package, of the open vr xr plugin that works beautifully. Now, don't install the final SteamVR Input in this menu as it is still 2.6.0.3b or whatever, import the latest from the store which is 2.6.1. This will allow you to handle all the new input for index controls and such. This will make it to where you can now house all of the headset runtime under the XR Management and have what VRTK used to be for, and it'll automatically detect all headsets and switch runtimes. It is a beautiful thing!
     
  35. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    145
    Except that SteamVR action input still doesn't work with Unity XR yet, so its still a pain to support different devices.
     
    ROBYER1 likes this.
  36. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,037
    You can use the SteamVR asset store plugin with the OpenVR XR plugin if you need that https://github.com/ValveSoftware/unity-xr-plugin


    Installation
    • Download the installer: https://github.com/ValveSoftware/unity-xr-plugin/releases/tag/installer
    • Open your unity project and then open/import the unitypackage
    • Open the XR Management UI (Edit Menu -> Project Settings -> XR Plugin Management)
    • Click the checkbox next to OpenVR Loader - or in older versions - Under Plugin Providers hit the + icon and add “Open VR Loader”
    Standalone (no input)
    • Add a cube to the scene (scale to 0.1)
    • Add a Camera component to the cube
    • Add TrackedPoseDriver to the cube
    • Main Camera: Under Tracked Pose Driver:
      • For Device select: “Generic XR Device”
      • For Pose Source select: “Center Eye - HMD Reference”
    • Hit play and you should see a tracked camera
    SteamVR Input System:
    • Install SteamVR Unity Plugin v2.6.0b4 (https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.6.0b4)
    • It should install the OpenVR XR API package automatically for 2020.1+ for 2019.3/4 you’ll need to add it with the instructions above.
    • Open the SteamVR Input window (Window -> SteamVR Input)
    • Accept the default json
    • Click Save and Generate
    • Open the Interactions_Example scene (Assets/SteamVR/InteractionSystem/Samples/Interaction_Example.unity)
    • Hit play, verify that you can see your hands and teleport around
     
  37. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    145
    What I meant was that controller actions can't be used through the unity xr interaction toolkit out of the box, which means you get the input from steamvr, now if I also want to support occulus then I need to get the input from the unity package, which makes it a pain for multiple devices.
    At the moment I use this hack to make SteamVR input work in the XR interaction toolkit:
    https://skarredghost.com/2020/09/25/steamvr-unity-xr-interaction-toolkit-input/
     
  38. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,037
    Yep, there are a few hacks, I have written my own hack also (makes you think if hacks exist, Valve could just provide the functionality out the box even if it isn't perfect)
     
  39. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    185
    THE WHOLE THINK IS ONE FREAKIN MESS!!!!!...TYPICAL UNITY, PASS THE BUCK, NOTHING WORKS, NO CLEAR ANSWER.. VR IN UNITY IS A BROKEN USELSESS MESS.

    XR...IT'S DISCUSTING THE WAY UNITY DOES THINGS...SHOW ME HOW YOU CAN DO A SINGLE APPLICATION TO TARGET ALL VR-HEADSETS??????????????? MESS MESS MESS . AGAIN I WASTED COUNTLESS HOURS TESTING TO NO SOLUTION.

    MAKE IT CLEAR!!!!!!!!! WHAT THE HELL DID YOU GUYS DO???
     
  40. Cloudwalker_

    Cloudwalker_

    Joined:
    Jan 3, 2014
    Posts:
    17
    You can try this asset demo here, I've wrapped input handling for all major devices so that users don't have to, includes device detection logic. They do still get wrapped to a "raw input" wrapper controller class, but that could be expanded on.

    https://cloudwalkingames.itch.io/hurricanevr-framework-demo
     
  41. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    145
    What dependencies does your asset require?
     
  42. EntertainmentEnterprise

    EntertainmentEnterprise

    Joined:
    Aug 22, 2018
    Posts:
    18
    With using Vive Input Utility 1.12 and SteamVR 2.6.1 non beta with the non preview open vr xr plug in I have yet to have to do any crazy hacks... Maybe they've fixed it with 2.6.1 or maybe VIU is handling it properly now I dunno, but I didn't have to do steps 8 through 12 of that one guys hack and it works fine...
     
  43. FakeByte

    FakeByte

    Joined:
    Dec 8, 2015
    Posts:
    145
    You probably get the input from steamvr, if you started off with the steamvr examples, they all use steamvr input.
     
  44. EntertainmentEnterprise

    EntertainmentEnterprise

    Joined:
    Aug 22, 2018
    Posts:
    18
    Nope, was using XR. But I just realised that some things are in fact broken and I am dumb, so I am implementing Tony's hack now *sigh*.
     
  45. AdamSt

    AdamSt

    Joined:
    Jun 2, 2013
    Posts:
    16
    So, there is still no any solution with new XR and Unity 2020 that is better than - what I've been doing succesfully - using SteamVR + Unity 2019.4.xxx what contains all useful scripts like interactable, throwable, circular drive, hand physics, collisions, animations, examples etc.?
     
  46. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,037
    Have you heard of Unity XR Interaction Toolkit? I stg most VR devs on here don't even google anything sometimes.
     
    FakeByte likes this.
  47. Shaunyowns

    Shaunyowns

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    328
    Going to close this post as its gotten a little out of hand, feel free to make a new thread if you want to focus on a specific point as I'll be more than happy to look into it!
     
    FlightOfOne likes this.
Thread Status:
Not open for further replies.
unityunity