【发布时间】:2021-12-01 14:24:49
【问题描述】:
我正在尝试通过创建一个统一项目、构建统一项目然后部署统一生成的解决方案来使用 Hololens 2 扫描 QR 码。
我已尝试遵循本指南:https://localjoost.github.io/Reading-QR-codes-with-an-MRTK2-Extension-Service/
每当运行 Microsoft.MixedReality.QR 的任何代码时,我都会收到 System.RuntimeType::GetGUID(System.Type, System.Byte[]) 的缺失方法异常
即使我只是通过以下行检查是否支持扫描二维码,也会发生异常:
QRCodeWatcher.IsSupported();
堆栈跟踪看起来有点像这样:
System.Reflection.TragetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException:
System.RuntimeType::GetGUID(System.Type, System.Byte[])
at System.RuntimeType.get_GUID() [0x00000] in <00000000000000000000>:0
at WinRT.IObjectReference.As[T]()[0x00000] in <00000000000000000000>:0
at WinRT.ActivationFactory`1[T].As[I]() [0x00000] in <00000000000000000000>:0
at Microsoft.MixedReality.QR.QRCodeWatcher+Statics..ctor()[0x000000] in <00000000000000000000>:0
如果有帮助,我正在使用 Windows SDK 10.0.19041.0 和 Unity 2021.2.3f1
【问题讨论】:
标签: c# unity3d hololens windows-mixed-reality