简体   繁体   English

使用 Unity 和 HoloLens2 导入.dll

[英]Importing .dll with Unity and HoloLens2

I tried to develop an augmented reality application with Unity for HoloLens2.我尝试使用 Unity for HoloLens2 开发增强现实应用程序。 Therefore we need to connect the application with an external controller from fischertechnik.因此,我们需要将应用程序与来自 fischertechnik 的外部 controller 连接起来。 I tried to import the.dll which is needed into unity.我尝试将需要的.dll 导入统一。 There are no errors in Visual Studio, in the Unity Player everything works fine and the application connects with the controller. Visual Studio 中没有错误,在 Unity Player 中一切正常,应用程序与 controller 连接。 But if we try to build it, a bunch of errors occur: enter image description here .但是如果我们尝试构建它,就会出现一堆错误:在此处输入图像描述 Would be nice if someone could help!如果有人能帮忙就好了! Thanks谢谢

Settings:设置:

Build Settings构建设置

Player Settings播放器设置

DLLs动态链接库

Short answer: Change your minimum UWP setting to 10.0.16299 or later (I'd choose at least 18362 for HoloLens 2)简短回答:将您的最小 UWP 设置更改为10.0.16299或更高版本(我会为 HoloLens 2 选择至少 18362)

More info:更多信息:

HoloLens applications are UWP apps, so you will need to make sure that your libraries are supported in UWP. HoloLens 应用程序是 UWP 应用程序,因此您需要确保 UWP 支持您的库。

From the errors you list, the problems come from System.Reactive.Windows.Threading.dll.从您列出的错误中,问题来自 System.Reactive.Windows.Threading.dll。 Per the System.Reactive.Windows.Threading project at https://github.com/dotnet/reactive , the supported platforms for v5.x include UWP 10.0.16299 with a note that "Support for UWP 10.0 has been removed" Per the System.Reactive.Windows.Threading project at https://github.com/dotnet/reactive , the supported platforms for v5.x include UWP 10.0.16299 with a note that "Support for UWP 10.0 has been removed"

Looking at your Build Settings, your app's minimum UWP target is 10.0.10240.0 (aka UWP 10.0).查看您的构建设置,您的应用程序的最小 UWP 目标是 10.0.10240.0(又名 UWP 10.0)。

This specific error should go away if you upgrade your minimum UWP setting to 10.0.16299.如果您将最小 UWP 设置升级到 10.0.16299,则此特定错误应该 go 消失。

16299 was the first UWP version to support.Net Standard 2.0 and so is a common base level for managed UWP apps. 16299 是第一个支持.Net Standard 2.0 的 UWP 版本,因此是托管 UWP 应用程序的通用基础级别。 16299 shipped as the Fall Creators Update in November 2017, several years and versions before the HoloLens 2 shipped in 2019 with Build 18362.1039 . 16299 于 2017 年 11 月作为 Fall Creators Update 发布,比2019 年 HoloLens 2 发布的版本 18362.1039早了几年和版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM