首页 > 解决方案 > 基本 Unity 应用程序仅在 Hololens 上显示黑色/空白,没有启动画面

问题描述

提前为任何格式错误道歉

一个朋友和我按照步骤MR Basics 100:Unity 入门,一切都很好,直到在 Unity 中构建解决方案并从 Visual Studio 部署。

构建和部署成功,但在 Hololens 耳机上无法察觉应用启动。通过测试,我决定打开设置应用程序,以便在 Visual Studio 启动应用程序时看到它消失。

没有启动屏幕(我们没有定义任何自定义启动屏幕,所以我希望默认的“使用 Unity 制作”屏幕),应用启动时也没有任何可见的更改/活动。

我正在使用 VS 2017 和 2019 的免费/社区版本,该项目是使用 Unity 2019.2.0f1 的免费版本创建的

这个基本 Unity 项目的我的 Github,在摄像机前有一个立方体和 MR Basics 100 设置

请注意,全息远程处理在第 5 章中按预期工作:

第 5 章 - 从 Unity 编辑器验证设备

以下图片的Imgur相册

Visual Studio输出:Debug 始终如下所示:

创建一个新的干净布局...

复制文件:总共 53 mb 到布局...

检查是否安装了所需的框架...

注册应用程序以从布局运行...

部署完成 (0:00:53.714)。全包名:“Template3D_1.0.0.0_x86__pzq3xp76mxafg”

========== 构建:2 成功,0 失败,0 最新,0 跳过 ==========

========== 部署:1 成功,0 失败,0 跳过 ==========

使用 Imgur refs 尝试的 Unity 构建设置变化总结:

Hololens Windows 10.0.17763.914

1.

初始/无变化:遵循 MS 默认步骤:

目标设备:任何设备

架构:保留为 x64

目标 SDK 版本:最新安装 (10.0.18362.0?)

用 VS 2019 打开

2.

第一次改变

目标设备:任何设备

架构:保留为 x64

目标 SDK 版本:手动设置为 10.0.17763.0

用 VS 2019 打开

3.

第二次改变

目标设备:任何设备

架构:现在,已更改为 x86

目标 SDK 版本:仍手动设置为 10.0.17763.0

用 VS 2019 打开

4.

第三次改变

目标设备:任何设备

架构:仍然更改为 x86

目标 SDK 版本:手动设置为 10.0.17763.0

用VS 2017打开

5.

https://medium.com/@mkryaz/step-by-step-hololens-1-with-unity-and-visual-studio-tutorial-4601d5dfcc8f - 步骤 4.9 大约一半

当调试输出约为 75% 时,应用程序从 VS 2017 自动启动到 HL 上,如下所示:'HoloLensDemo.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'。已加载符号。

与之前所有的结果相同 - 没有 Unity 启动画面,只有黑色/空白

来自 Sunius 的评论更新

标签: visual-studiounity3dvisual-studio-2017visual-studio-2019hololens

解决方案


It turns out that Unity 2017 LTS worked right away. I'd seen it as an option in Unity Hub, but didn't try it because all the docs say Unity 2018 LTS or 2019, and they're supposed to be backward compatible with Hololens 1 ¯_(ツ)_/¯

It's unclear to me how a reader is supposed to gather this from the docs:

The current recommendation is to use Unity 2018.4.x, which is the LTS build required for MRTK v2 below.

MRTK v2 is intended to accelerate development of applications targeting Microsoft HoloLens, [...]

https://docs.microsoft.com/en-us/windows/mixed-reality/install-the-tools


推荐阅读