DllNotFoundException: XRSDKOpenVR

Unity中使用SteamVR 2.0 时异常:
DllNotFoundException: XRSDKOpenVR
Unity.XR.OpenVR.OpenVRLoader.Initialize () (at Library/PackageCache/[email protected]/Runtime/OpenVRLoader.cs:183)
UnityEngine.XR.Management.XRManagerSettings.InitializeLoaderSync () (at Library/PackageCache/[email protected]/Runtime/XRManagerSettings.cs:169)
UnityEngine.XR.Management.XRGeneralSettings.InitXRSDK () (at Library/PackageCache/[email protected]/Runtime/XRGeneralSettings.cs:175)
UnityEngine.XR.Management.XRGeneralSettings.AttemptInitializeXRSDKOnLoad () (at Library/PackageCache/[email protected]/Runtime/XRGeneralSettings.cs:148)

报错是说XRSDKOpenVR.dll文件找不到,其实这个dll是存在的,原因是这个dll依赖的另一个dll文件没有找到,所以无法正常编译该dll

OpenVR Desktop这个插件Unity官方已经不更新了,从PackageManager下载的包是有问题的,编译时找不到依赖的dll文件

解决办法:

  1. 手动下载valve官方的package包:OpenVR Unity XR Package v1.1.4
  2. 用Package Manager 添加包到工程
  3. 重启Unity

在PackageManager中使用add package from tallbar… 模式加载包
DllNotFoundException: XRSDKOpenVR_第1张图片

你可能感兴趣的:(Unity3D,c#,unity3d)