Can't build for iOS if OpenVR XR plugin is in project
See original GitHub issueI am experiencing a similar issue to #5 when building a project for iOS (testing a combined XR and AR setup) where Unity attempts to include multiple versions of the OpenVR XR plugin’s native plugins in the build, resulting in the iOS build failing:
Plugin 'XRSDKOpenVR.dll' is used from several locations:
Packages/com.valvesoftware.unity.openvr/Runtime/x64/XRSDKOpenVR.dll would be copied to <PluginPath>/XRSDKOpenVR.dll
Packages/com.valvesoftware.unity.openvr/Runtime/x86/XRSDKOpenVR.dll would be copied to <PluginPath>/XRSDKOpenVR.dll
Plugin 'openvr_api.dll' is used from several locations:
Packages/com.valvesoftware.unity.openvr/Runtime/x86/openvr_api.dll would be copied to <PluginPath>/openvr_api.dll
Packages/com.valvesoftware.unity.openvr/Runtime/x64/openvr_api.dll would be copied to <PluginPath>/openvr_api.dll
Plugin 'ucrtbased.dll' is used from several locations:
Packages/com.valvesoftware.unity.openvr/Runtime/x64/ucrtbased.dll would be copied to <PluginPath>/ucrtbased.dll
Packages/com.valvesoftware.unity.openvr/Runtime/x86/ucrtbased.dll would be copied to <PluginPath>/ucrtbased.dll
Plugin 'libopenvr_api.so' is used from several locations:
Packages/com.valvesoftware.unity.openvr/Runtime/x64/lib/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so
Packages/com.valvesoftware.unity.openvr/Runtime/x64/libopenvr_api.so would be copied to <PluginPath>/libopenvr_api.so
Please fix plugin settings and try again.
Can these native plugins have their import settings changed to only be included for Editor and Standalone platforms in the same way that the Oculus XR plugin does in order to prevent them being needlessly included in builds for unsupported platforms, like iOS?
Current OpenVR native plugin import settings:
Oculus XR plugin import settings:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
Top Results From Across the Web
XR Plugin Management - Can't Enable Plugin
I've run into this bug previously when attempting to add Valve's OpenVR XR Plugin, however assumed that when it didn't work it was...
Read more >Manual: XR Project set up
Use the XR Plug-inA set of code created outside of Unity that creates functionality in Unity. · Add XR support packages, such as...
Read more >How to build and run OpenXR applications in Unity
Then click on “Player Settings…” and in the project settings, go to the XR Plugin Management tab. Select the “PC” platform in it...
Read more >ARKit XR is not enabled error though it is enabled
Open Project Setting > XR Plug-in Management > iOS tab and enable ARKit. Although ARKit is enabled, the issue still says I have...
Read more >How to Install and Enable XR Interaction Toolkit for VR ...
Go to the Unity Registry dropdown option in the top left corner. Unity. At the bottom of the list, you will find the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think I fixed this is #55 if it gets merged
I agree with @mastayb. The problem still persists. For a windows build everything works. But, I get the following error when building for Linux:
Our goal is to build a multi-user game for several windows clients that are connected via a headless Linux server. For the Linux build, we remove the SteamVR scripts using a condition within the SteamVR assembly definition asset. However, the OpenVR XR Plugin package still throws the error above.
My current workaround is to delete the folder
com.valvesoftware.unity.openvr-1.1.4.tar\package\Runtime\x64\lib
that is located within the archiveAssets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgz
. This removes the duplicate filelibopenvr_api.so
which was “temporarily” introduced in 0ba278b7869e12137b311c22bc0198b0a4df3664. It’s not pretty but the temporary changes of 0ba278b7869e12137b311c22bc0198b0a4df3664 will hopefully be removed soon so that this hack is not needed anymore.