Valve’s OpenVR XR plugin works fine in editor, but when I make a Win64 build, it doesn’t seem to fully bind to the SteamVR runtime. There is no tracking of the headset, the game window just shows the camera at the origin, and when it launches it shows the default Unity splash instead of our VR splash. There are no errors logged, so no idea what is going wrong.
In the HMD, it shows the Steam compositor and says “Up Next ” but never actually leaves the compositor.
I’m using Unity 2019.4.26f1 with OpenVR XR plugin 1.1.4. I see there’s supposed to be a 3.0.0 version of the plugin, but when I tried to get it to install, I was sent on this crazy loop that, long story short, winds me back up with version 1.1.4. If someone knows a way to get a newer version to successfully install, I can try that and see if that solves it.
This is a common problem and can sometimes be a bit finicky (from experience).
If you have SteamVR from the Asset store installed, try this:
Uninstall OpenVR XR plugin.
Goto Package manager and select the “+” icon at the top left.
Select “Add package from tarball”
Use the file: “[Project Root]/Assets/SteamVR/OpenVRUnityXRPackage/Editor/com.valvesoftware.unity.openvr-1.1.4.tgz”.
Make sure OpenVR has been added to the XR Plugin in the editor under “Edit/Project Settings”.
If this works and you are not the only one working on the project, make sure that the project also complies for them (sometimes there can be issues with local paths).
If this does not work let me know and I can give some other suggestions.
If you are having a problem in the editor and multiple frameworks, something has probably gone wrong within the XR Management plugin or the unity project itself.
Have you tried uninstalling and reinstalling XR Management plugin?
Does the VR mode occasionally work for OpenVR AND OpenXR?
What VR rig are you using? (XR interaction device/action, SteamVR player, …)
Are there any errors in the console when running the application?
I think I’d need to see the project itself to see if I can think of anything, as it’s a little weird for VR mode to only occasionally work in the editor (unless the headset is only sometimes connected).
Lmk if you want me to look into the project or if you have and more info.
If you have install multi runtime(eg:SteamVR, oculus desktop, windows mixed reality) on your computer, the openxr will set the “system default runtime” to one of them. So when you run a XR app, the system just use the default runtime whether the require device get plugged in. If that happens to you, you can try my solution in this post .
The method to install it is the one I finally used to successfully install it into my project. However, I’m not having problems in the editor. As I said, it works perfectly in editor, just not in an actual build. I even tried uninstalling every other framework and only keeping Valve’s OpenVR XR plugin installed, and it still wouldn’t work in a Windows 64 build. And it isn’t just occasional. It never works. Also, as I mentioned, there are no errors in the log, so I don’t know what’s going wrong.
I do have multiple runtimes installed on the machine I’m testing on. But do I understand from your post that you are saying the solution is to change the current XR module inside SteamVR settings? That sounds like a problem every end-user will have to solve themselves if they are in the same situation on their PC. Or did you find a way to keep this from being a problem from within the game itself?
Like the_real_apoxol said in #4 , OpenXR working group is working on it. I also try to manual set the runtime before game init but it doesn’t work (you can try my code in #7), maybe unity will come up with a perfert solution for us:(