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.

Can't build for iOS if OpenVR XR plugin is in project

See original GitHub issue

I 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: image

Oculus XR plugin import settings: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
rpavlikcommented, Oct 5, 2020

I think I fixed this is #55 if it gets merged

0reactions
adrianhoppecommented, Aug 5, 2021

I agree with @mastayb. The problem still persists. For a windows build everything works. But, I get the following error when building for Linux:

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.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions (string) UnityEditorInternal.PluginsHelper:CheckFileCollisions (UnityEditor.BuildTarget) UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)

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 archive Assets\SteamVR\OpenVRUnityXRPackage\Editor\com.valvesoftware.unity.openvr-1.1.4.tgz. This removes the duplicate file libopenvr_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.

Read more comments on GitHub >

github_iconTop 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 >

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