OpenVR Loader initializes regardless of Unity XR "Initialize XR on Startup" option.
See original GitHub issueHello!
I’ve been in the process of moving from a much older version of OVR/SteamVR to the new Unity XR Plug-in system. Most things have been pretty straight forward, but with this project I’ve hit a blocking issue: this application needs to be running two instances.
Currently, regardless of build settings, opening a second instance causes the first to immediately quit, as it has initialized the VR hardware. (I’m using a Vive Pro Eye at the moment, not sure if that matters.)
Previously we were able to work around this issue by building the project twice: once with “VR Enabled” checked and once with “VR Enabled” unchecked. That would allow us to start one of the instance where it was enabled, and then any other number of instances with the disabled one. I’ve tried scripting the adjustment of XRGeneralSettings.Instance.InitManagerOnStart
to both true
and false
for building two instances of the player too, but it doesn’t seem to make a difference there either.
I’m attempting to replicate that now, but it seems the OpenVR Loader plugin completely ignores the “Initialize XR on Startup” option. Regardless of that setting, OpenVR seems to initialize and open the hardware, because opening another instance always causes the first to close.
Ideally I’d like to be able to have just a single build, and then either launch to a “chooser” scene that would allow me to go the VR route or the non-VR route, but it seems no solution is working at the moment, or I’m misunderstanding the systems.
Is there something I’m missing or doing wrong, or is this a defect?
Below are some screenshots of the settings I’m trying.
Here is the tiny build script I use to build two copies of the player build script gist.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
@nitz I posted a PR for this that possibly fixes it. If you have time to test check out that request and if it solves your issue and please leave a comment on your results. Thanks!
I was only testing it in builds. My development machine isn’t the same machine I typically use for testing, so I wasn’t investigating it in the editor at all. I’m not in this particular project this week but can check sometime next week!