UE 5.1 OpenXR Not Working

We have encountered an issue where we cannot get VR preview to run in 5.1 projects on OpenXR. We are using the HTC Vive Pro. We’re trying to utilize OpenXR because we have lost many of the SteamVR nodes we were using in our migration assumedly because it has been deprecated.

To test I created a fresh VR template project which only has the OpenXR plugin enabled by default(SteamVR plugin disabled etc). When attempting to VR Preview the button is greyed out. SteamVR application is running in the background with all devices working correctly. I have updated SteamVR and tried using the Beta branch as well. We cannot access any OpenXR nodes via blueprint either, they are simply missing.

I have run OpenXR Explorer which is referenced in the UE documentation. SteamVR is selectable as a runtime. However, there are some error messages:

xrCreateInstance error: XR_ERROR_RUNTIME_UNAVAILABLE

xrGetSystem error: No XrInstance available

xrCreateSession error: No XrInstance available

Is this feature currently broken? We have observed this across multiple machines. The only documentation I have found regarding the setup of OpenXR is here: OpenXR Prerequisites in Unreal Engine | Unreal Engine 5.0 Documentation

Would greatly appreciate any potential solutions you have to offer, thanks.

1 Like

OpenXR should work with the SteamVR runtime for all Unreal versions that have it. The XR_ERROR_RUNTIME_UNAVAILABLE error indicates that it can’t find the active OpenXR runtime, or otherwise fails to do the initial loading of it. The most common cause is that the registry key for the active runtime is not set up properly.

SteamVR should set the key automatically if there is no other active runtime installed on the system. If the key is not set correctly, it can be set from the SteamVR settings menu by enabling the advanced options and going to the developer tab. If the runtime is not set correctly, it will have a button to set it.

If that does not work, check in the Windows registry that the ActiveRuntime value in HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1 is pointing at an existing file.

2 Likes

I use PICO 4 for development, and I always encounter VR preview gray,
I tried to reinstall SteamVR, but after a couple of times it worked properly, the VR preview would get grey again, I even re-installed Steam a couple of times, and repeatedly logged out of my Steam account and re-logged in. But still only occasionally successful, mostly gray

It’s possible that you might need to have the headset plugged in and turned on, and SteamVR running before you start the Unreal editor. I think the issue with mobile headsets is that the runtime returns XR_ERROR_FORM_FACTOR_UNAVAILABLE from xrGetSystem() when the headset isn’t plugged in (it’s required to do this by spec), and Unreal doesn’t have any code to retry it when it fails.

1 Like