c# - HoloLens 中的 QR 扫描 - DLL 错误
问题描述
我正在尝试从 HoloLens 中实现二维码阅读器,使用 Mike Taulty 的解决方案(https://mtaulty.com/2016/12/28/windows-10-uwp-qr-code-scanning-with-zxing-和-hololens/)。但是,我在 Unity 中构建项目时遇到问题,因为我收到构建错误:"Assets\Placeholder.cs(20,9): error CS0103: The name 'MediaFrameQrProcessing' does not exist in the current context"
,这似乎暗示 DLL 无法正常工作?我的项目中已经有一个同名的 DLL,我认为这个 DLL 可以解决这个问题,但似乎没有。
我正在运行 Unity 2018.4.1 和 Visual Studio 2019。我在他的 GitHub 存储库 ( https://github.com/mtaulty/QrCodes ) 之上构建。
这是引发构建错误的块。MediaFrameQrProcessing
找不到
public void OnScan()
{
this.textMesh.text = "scanning for 30s";
#if !UNITY_EDITOR
MediaFrameQrProcessing.Wrappers.ZXingQrCodeScanner.ScanFirstCameraForQrCode(
result =>
{
UnityEngine.WSA.Application.InvokeOnAppThread(() =>
{
this.textMesh.text = result ?? "not found";
},
false);
},
TimeSpan.FromSeconds(30));
#endif
}
预期:没有事件的项目构建
实际结果:Assets\Placeholder.cs(20,9): error CS0103: The name 'MediaFrameQrProcessing' does not exist in the current context
构建错误。这应该由 DLL 覆盖
导入设置截图: