【问题标题】:How to implement MixedReality-ToolKit into an existing HoloLens project?如何在现有的 HoloLens 项目中实现 MixedReality-ToolKit?
【发布时间】:2019-08-16 03:36:51
【问题描述】:

我正在从这个项目扩展 Unity 2017.4.21f 中 Hololens 的 VideoCaptureExample:https://github.com/VulcanTechnologies/HoloLensCameraStream

现在我必须从 Canvas 控制 ScrollView 和 Button,所以我需要 MRTK 的 Gaze-Function。一旦我尝试从这个页面实现统一包:https://github.com/Microsoft/MixedRealityToolkit-Unity/releases 对于 2017.4.2.0,它向我展示了许多 C++ 异常,而我什至没有使用该包中的任何东西:

Exception thrown at 0x76EDF2B2 (KernelBase.dll) in HoloLensVideoCaptureExample.exe: WinRT originate error - 0x80131534 : 'System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'GLTFSerializationUWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
   at UnityEngineInternal.BootstrapHelpers.FillTypeMaps0(Dictionary`2 , List`1 )
   at UnityEng'.
Exception thrown at 0x76EDF2B2 (KernelBase.dll) in HoloLensVideoCaptureExample.exe: WinRT originate error - 0x80131534 : 'System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'GLTFSerializationUWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
   at UnityEngineInternal.BootstrapHelpers.FillTypeMaps0(Dictionary`2 , List`1 )
   at UnityEng'.
Exception thrown at 0x76EDF2B2 in HoloLensVideoCaptureExample.exe: Microsoft C++ exception: Platform::COMException ^ at memory location 0x04EFE2F8. HRESULT:0x80131534 The text associated with this error code could not be found.
WinRT-Informationen: System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'GLTFSerializationUWP, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
   at UnityEngineInternal.BootstrapHelpers.FillTypeMaps0(Dictionary`2 , List`1 )
   at UnityEng

我已经尝试检查播放器设置并对其进行了研究,但我真的陷入了这个问题。 这是我在 Unity 中的播放器设置:

【问题讨论】:

  • 只是为了确定:您已经在构建设置中切换到通用 Windows 平台?还有the gaze function到底是什么?您的意思是光标和指针功能,例如 PointerEnter、PointerDown 等?
  • 没有这个工具包的构建已经工作了,但是当我尝试实现 MRTK(混合现实工具包)时它没有。 Gaze 是 MRTK 的一部分,例如空间映射和其他 AR 功能。此外,当我没有实现 MRTK unitypackage 时,构建已经工作了

标签: unity3d hololens mrtk


【解决方案1】:

我刚刚使用了那个版本的 MRTK 和最新的 HoloLensCameraStream 源。仅运行 HoloLensCameraStream 示例会产生一些 C++ TypeLoadExceptions;添加 MRTK 2017.4.2.0 并没有增加它们,我也没有看到与 GLTFSerializationUWP 相关的类型加载。 相反,我确实在输出中看到 GLTFSerializationUWP 已成功加载,因为它现在作为包含 MRTK 的一部分包含在您的项目中。

两种选择:

  • 从 Unity 生成新的 UWP 构建到一个空文件夹中
  • 尝试更新到不再引用 GLTFSerializationUWP.dll 的较新 MRTK

希望有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-16
    • 2015-09-06
    • 1970-01-01
    • 1970-01-01
    • 2020-08-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多