DllNotFoundException: SteamVR + OpenVR Linux & MacOS
GabrielHare opened this issue · 6 comments
Using SteamVR v2.7.3 (sdk 1.14.15) + OpenVR v1.1.4
Running 'Simple Sample' scene in the editor on macOS or Linux, the editor console is filled with the following error (at least once per frame).
DllNotFoundException: openvr_api
Valve.VR.OpenVR.GetInitToken () (at Library/PackageCache/com.valvesoftware.unity.openvr@ef731560e504-1649573462390/Runtime/openvr_api.cs:7465)
Valve.VR.OpenVR+COpenVRContext.CheckClear () (at Library/PackageCache/com.valvesoftware.unity.openvr@ef731560e504-1649573462390/Runtime/openvr_api.cs:7835)
Valve.VR.OpenVR+COpenVRContext.VRRenderModels () (at Library/PackageCache/com.valvesoftware.unity.openvr@ef731560e504-1649573462390/Runtime/openvr_api.cs:7935)
Valve.VR.OpenVR.get_RenderModels () (at Library/PackageCache/com.valvesoftware.unity.openvr@ef731560e504-1649573462390/Runtime/openvr_api.cs:8114)
Valve.VR.SteamVR_RenderModel.Update () (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:739)
Tested:
Unity 2019.4.36f1 macOS 12.2.1 (21D62) -> stream of errors
Unity 2019.4.36f1 Ubuntu 20.04 -> stream of errors
Unity 2019.4.36f1 Windows 10.0.19044 this combination of SteamVR + OpenVR plugins -> works perfectly
Hello @GabrielHare, unfortunately, SteamVR on Mac is no longer supported in general (https://store.steampowered.com/news/app/250820/view/2216278054495230717).
On the SteamVR for Linux side, it sounds like you have encountered the issue being tracked at #3. Closing in favor of the older issue report.
@kisak-valve while this issue is related to issue #3 I'm not reporting a lack of support. The problem I'm reporting is that when my project is configured to use SteamVR + OpenVR plugins, the console becomes flooded with errors in macOS and Linux environments.
My request here is for the plugin to have a reasonable behavior on unsupported platforms so that it is safe to include.
What I would expect is a logged warning when starting the player in the editor, and an API state indicating no connected devices so that developers can fall back to a desktop interface.
NOTE: After testing the legacy input configuration of SteamVR I have found that it logs errors just once when playing on macOS and linux. This behavior makes the legacy configuration SteamVR safe to include in a multi-platform project, even through VR support on might not be available on all platforms. This is the behavior that I am requesting for the SteamVR + OpenVR plugin configuration.
When I can confirm a working configuration I will describe it here in case it helps anyone else building a VR-optional cross-platform application.
That seems reasonable, we'll try to get it into the next version.
@zite thank you for supporting & re-opening :-)
Solved: using the legacy configuration instead of the SteamVR + OpenVR configuration does not flood the console with errors.
Tested on systems listed in first post. Using
- Index SteamVR headset
- Odyssey Windows Mixed Reality headset
- Quest (Link) Oculus headset
Since the issue turns out to be with SteamVR and not OpenVR I have opened an issue in the unity_steamvr_plugin project and referenced this issue.
DllNotFoundException: openvr_api
Valve.VR.OpenVR.GetInitToken () (at Library/PackageCache/com.valvesoftware.unity.openvr@f7a83e1af165-1681392835888/Runtime/openvr_api.cs:7465)
Valve.VR.OpenVR+COpenVRContext.CheckClear () (at Library/PackageCache/com.valvesoftware.unity.openvr@f7a83e1af165-1681392835888/Runtime/openvr_api.cs:7835)
Valve.VR.OpenVR+COpenVRContext.VRInput () (at Library/PackageCache/com.valvesoftware.unity.openvr@f7a83e1af165-1681392835888/Runtime/openvr_api.cs:8013)
Valve.VR.OpenVR.get_Input () (at Library/PackageCache/com.valvesoftware.unity.openvr@f7a83e1af165-1681392835888/Runtime/openvr_api.cs:8120)
Valve.VR.SteamVR_Behaviour.LateUpdate () (at Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:236)
Greetings
DllNotFoundException: openvr_api assembly: type: member:(null)
Valve.VR.OpenVR.GetInitToken () (at Library/PackageCache/com.valvesoftware.unity.openvr@3ee6c452bc34/Runtime/openvr_api.cs:7465)
Valve.VR.OpenVR+COpenVRContext.CheckClear () (at Library/PackageCache/com.valvesoftware.unity.openvr@3ee6c452bc34/Runtime/openvr_api.cs:7835)
Valve.VR.OpenVR+COpenVRContext.VRInput () (at Library/PackageCache/com.valvesoftware.unity.openvr@3ee6c452bc34/Runtime/openvr_api.cs:8013)
Valve.VR.OpenVR.get_Input () (at Library/PackageCache/com.valvesoftware.unity.openvr@3ee6c452bc34/Runtime/openvr_api.cs:8120)
Valve.VR.SteamVR_Behaviour.Update () (at Assets/SteamVR/Scripts/SteamVR_Behaviour.cs:244)
Same Problem