ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 256 forks source link

XRSDKOpenVR assembly not found in a migrated Unity project from 2019 to 2021 #1072

Closed JorgeZubog closed 1 year ago

JorgeZubog commented 1 year ago

Hi, I'm currently working on the migration from Unity project 2019.4.14f1 to Unity project 2021.3.10f1, meaning also, the migration of the plugin SteamVR adapted to XR Plugin Management.

I imported the package SteamVR Unity Plugin v2.7.3 (sdk 1.14.15) on my project, then I just tryed launching the "Simple Sample.scene" from the package content with the "OpenVR Loader" and "Initialize XR on Startup" checked in the XR Plugin Management section of Project Settings

The result: the VR is not initilized and the following errors pop up.

DllNotFoundException: XRSDKOpenVR assembly:<unknown assembly> type:<unknown type> member:(null) Unity.XR.OpenVR.OpenVRLoader.Initialize () (at Library/PackageCache/com.valvesoftware.unity.openvr@3ee6c452bc34/Runtime/OpenVRLoader.cs:185) UnityEngine.XR.Management.XRManagerSettings.InitializeLoaderSync () (at Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRManagerSettings.cs:190) UnityEngine.XR.Management.XRGeneralSettings.InitXRSDK () (at Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRGeneralSettings.cs:175) UnityEngine.XR.Management.XRGeneralSettings.AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/com.unity.xr.management@4.2.0/Runtime/XRGeneralSettings.cs:148)

I'm using HTC Vive pro as VR device.

Could I have some help here? I would be really glad.

Here is my Editor Log and my SteamVR report:

Editor.log SteamVR-2022-11-18-PM_05_19_39.txt

zite commented 1 year ago

Thanks for including so much information. It looks like from the log you still have the old standalone openvr package from unity installed. Lets try removing that first as it may be causing issues. In your package manager you should see OpenVR Desktop. It should show as being created by Unity. Remove that and try again.

JorgeZubog commented 1 year ago

Hi Zite, That works! Thanks a lot! Effectively, the problem was the openvr package. Now my project works correctly. Cheers.