我试图开发一个具有Vuforia引擎功能的Unity项目,以将其部署到HoloLens。简短的问题摘要:不起作用。我首先使用Vuforia AR相机和放置在视场中的3D立方体创建了一个非常简单的项目,只是为了对其进行测试。 它可以在Unity预览中显示它。但是,Unity控制台会出现错误,并且Unity程序不能在HoloLens上运行,也不能在Visual Studio预览中作为独立应用程序运行。经常发生的一种错误是:
DllNotFoundException:VuforiaWrapper。
可以在Visual Studio中构建一个独立的应用程序,该应用程序应显示3D立方体,但是背景为黑色,相机无法正常工作(Razer Kiyo)。
我尝试了多个Unity版本,其中包括2017年和2018年的LTS版本以及Visual Studio 2017年和2019年。它不适用于以上任何一个版本。
将Vuforia Hololens示例导入Unity会使该项目崩溃,并使其对于我尝试过的每个Unity版本都无法编译,因此我不得不放弃这一点。
有人知道如何解决吗?对于这样一个简单的项目甚至不起作用,这似乎很奇怪。
从附加的Visual Studio版本中查找日志文件:
Mono path[0] = 'C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build /bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Managed'
Mono config path = 'C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/x64/Debug/MonoBleedingEdge/etc'
PlayerConnection initialized from C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55402
Multi-casting "[IP] 10.4.2.246 [Port] 55402 [Flags] 2 [Guid] 682190711 [EditorId] 0 [Version] 1048832 [Id] WindowsPlayer(DeepThought) [Debug] 0 [PackageName] WindowsPlayer" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55402]
PlayerConnection already initialized - listening to [0.0.0.0:55402]
Initialize engine version: 2018.4.11f1 (7098af2f11ea)
GfxDevice: creating device client; threaded=1
XR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_PathRegistryNotFound: "Installation path could not be located (110)"!
(Filename: C:\buildslave\unity\build\Runtime/VR/OpenVR/OpenVR.cpp Line: 1835)
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: NVIDIA GeForce RTX 2080 Ti (ID=0x1e04)
Vendor:
VRAM: 11049 MB
Driver: 25.21.14.1967
Begin MonoManager ReloadAssembly
- Completed reload, in 0.100 seconds
<RI> Initializing input.
XInput1_3.dll not found. Trying XInput9_1_0.dll instead...
<RI> Input initialized.
<RI> Initialized touch support.
XR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_PathRegistryNotFound: "Installation path could not be located (110)"!
(Filename: C:\buildslave\unity\build\Runtime/VR/OpenVR/OpenVR.cpp Line: 1835)
XR: OpenVR Error! OpenVR failed initialization with error code VRInitError_Init_PathRegistryNotFound: "Installation path could not be located (110)"!
(Filename: C:\buildslave\unity\build\Runtime/VR/OpenVR/OpenVR.cpp Line: 1835)
UnloadTime: 0.641200 ms
Compiled for Play Mode
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Vuforia.PlatformRuntimeInitialization:InitPlatform()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
DllNotFoundException: VuforiaWrapper
at (wrapper managed-to-native) Vuforia.VuforiaNativeWrapper.initPlatformNative()
at Vuforia.VuforiaNativeWrapper.InitPlatformNative () [0x00000] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.PlayModeUnityPlayer.InitializePlatform () [0x00005] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaRuntime.InitPlatform (Vuforia.IUnityPlayer player) [0x0000b] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.PlatformRuntimeInitialization.InitPlatform () [0x00097] in <77657aff10f3423b8360b40ff8e9348d>:0
(Filename: <77657aff10f3423b8360b40ff8e9348d> Line: 0)
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: VuforiaWrapper
at (wrapper managed-to-native) Vuforia.VuforiaNativeWrapper.deviceIsEyewearDevice()
at Vuforia.VuforiaNativeWrapper.DeviceIsEyewearDevice () [0x00000] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.Device.get_Instance () [0x00024] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VideoBackgroundManager.Initialize () [0x00000] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaARController.Awake () [0x0008b] in <77657aff10f3423b8360b40ff8e9348d>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <791f603facc4473dab4bf640d012ebda>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004b] in <791f603facc4473dab4bf640d012ebda>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <791f603facc4473dab4bf640d012ebda>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <791f603facc4473dab4bf640d012ebda>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <791f603facc4473dab4bf640d012ebda>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <791f603facc4473dab4bf640d012ebda>:0
at Vuforia.DelegateHelper.InvokeDelegate (System.Delegate action, System.Object[] args) [0x0000f] in <77657aff10f3423b8360b40ff8e9348d>:0
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.VuforiaBehaviour:Awake()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)
Initializing Vuforia Engine
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Vuforia.VuforiaRuntime:InitVuforia()
Vuforia.VuforiaRuntime:VuforiaInitialization()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper.dll
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/libVuforiaWrapper
DllNotFoundException: VuforiaWrapper
at (wrapper managed-to-native) Vuforia.VuforiaNativeWrapper.getVuforiaLibraryVersion(System.Text.StringBuilder,int)
at Vuforia.VuforiaNativeWrapper.GetVuforiaLibraryVersion (System.Text.StringBuilder value, System.Int32 maxLength) [0x00000] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaUnity.GetVuforiaLibraryVersion () [0x0000d] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaRuntime.LogVersions () [0x00000] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaRuntime.InitVuforia () [0x00012] in <77657aff10f3423b8360b40ff8e9348d>:0
at Vuforia.VuforiaRuntime.VuforiaInitialization () [0x0001d] in <77657aff10f3423b8360b40ff8e9348d>:0
(Filename: <77657aff10f3423b8360b40ff8e9348d> Line: 0)
Vuforia Engine cannot be started before it is initialized.
Please disable Delayed Initializationin the Vuforia configuration or initialize Vuforia manually with the VuforiaRuntime-class.
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Vuforia.VuforiaARController:Start()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
System.Delegate:DynamicInvokeImpl(Object[])
System.MulticastDelegate:DynamicInvokeImpl(Object[])
System.Delegate:DynamicInvoke(Object[])
Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.VuforiaBehaviour:Start()
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)
答案 0 :(得分:0)
错误DllNotFoundException: VuforiaWrapper
表示Unity正在尝试加载dll,但是DLL似乎不存在于正在加载的位置。
阅读错误,有很多形式:
Fallback handler could not load library C:/Visual Studio Projects/UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1/build/bin/UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data/Mono/VuforiaWrapper.dll
您是否已检查路径“ C:/ Visual Studio Projects / UnityHololens2018_4_11VuforiaUpdate8_5_8_64_86_Test1 / build / bin / UnityHololens2018_4_11TestVuforiaUpdate8_5_8_Data / Mono”以验证文件是否存在?似乎该错误消息来自您计算机上的本地运行,因此您应该能够仅检查目录。
通常,当我看到dll找不到错误时,是因为我的插件dll配置不正确。检查plugin documentation并再次检查是否已将vuforia dll配置为部署在您的计算机体系结构和HoloLens体系结构(x86)上。