visual-studio - 基本 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 章中按预期工作:
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 的评论更新
我没有看到任何关于“符号完成”/等的消息,但是一长串的
HoloLensDemo.exe (Win32): Loaded C:\Windows\System32\ClipboardServer.dll. Symbols loaded.
行停止了,有几行像HoloLensDemo.exe (Win32): Unloaded C:\Windows\System32\Windows.Networking.Connectivity.dll
,还有两行,The thread 0x12b4 has exited with code 0 (0x0)
所以我认为它已经完成了。VS 在部署期间自动启动应用程序,不受我的控制。我将了解如何检查网络活动。
手动打开应用程序的结果相同。完整输出:pastebin.com/fLXxvaFW
解决方案
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
推荐阅读
- node.js - 将数据从 reactjs 发布到 nodejs 后如何从 nodejs 获得响应?
- php - 在 CodeIgniter 4 的“Tests\Support\UserDatabaseTest”类中找不到测试
- java - 如何从 Kotlin 的工具栏菜单中删除标题?
- android-studio - Android Kotlin:如何设置错误editext使用数据绑定和LiveData
- load - RealityKit:无法从 USDZ 文件加载实体
- elasticsearch - ES查询按parent_id分组
- css - Bootstrap 折叠侧边栏
- javascript - 调整不同纵横比的图像大小以适应 div 而不拉伸它
- javascript - 在反应中使用 json-server 存储数据
- python - 在 Python 中发送带有 Excel 附件的电子邮件