question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenVR Loader initializes regardless of Unity XR "Initialize XR on Startup" option.

See original GitHub issue

Hello!

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.

image

image

Here is the tiny build script I use to build two copies of the player build script gist.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
Verexcommented, Jul 30, 2021

@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!

1reaction
nitzcommented, Jul 30, 2021

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Question XR Plugin Management Initialize on Startup
Hello, I'm using the new XR system, on my UWP game I have disable the option Initialize on Startup but in the final...
Read more >
Manual XR Initialization : r/Unity3D
I find myself baffled as to how I can call a function that will initialize XR manually; when Project Settings -> "Initialize XR...
Read more >
End-user documentation | XR Plugin Management | 4.3.3
Initialization of XR must be complete either before the Unity graphics system is setup and initialized (as in Automatic life cycle management) ...
Read more >
Unity XR SDK Compatibility | Varjo for developers
By default, Unity will initialize XR SDKs in alphabetical order. When using multiple XR SDKs, change the order to prioritize Varjo so that...
Read more >
How to make SteamVR input work with Unity XR Interaction ...
A detailed tutorial on how to solve the problem of input not working for SteamVR headsets in Unity when you use the XR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found