环境:
1.Unity 2020.3.35f1 (64-bit)
2.Visual Studio2022(版本:17.4.1)
3.MRTK(2.8.2)
安装顺序(vs2022-hololens2模拟器-unity2020.3.35-MRTK)
1.1.Hololen2问题
问题1.打包安装后进不去界面
1. 定位vclibs 不兼容 ?
2.Windows Mixreality(18362)?unity 2020+不支持
描述:当前系统比较老(2019.12.6),
解决:
1.尝试1:Hololens2 系统更新
2.unity 使用使用windows Mixed relality (hololens不支持,桌面vr 支持)
排除设备影响:
之前已经安装过unity2020 打包版本
1.调试问题
2.工程发包问题
1.重定向
1.Hololens 设备
1.软件信息:
1.系统版本:18362.1042.arm64fre.19h1_release_svc_sydney_prod.191202-1048 (64位,18362)https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/advanced-concepts/hololens-emulator-archive
设备:2019.12.6
2.安装工具:
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/install-the-tools
安装顺序:win10/11-vs2022-仿真器;
3.Unity 版本:
避坑:
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/unity/known-issues#active-blocking-issues
建议版本: Unity 2020.3 LTS
(Unity 2020.3.8+)
1.Unity 2020.3.8f1(https://www.youtube.com/watch?v=dOsYerpKloY)启动慢加载不进去
2.Unity 2020.3.24f1
3. Unity 2020.3.35f1(修复启动后有四个旋转点)
4.2021.3.4f1
4. 插件
1.OpenXR:版本 :<= 1.4.3 或 >= 1.5.3
2.Windows XR 插件
unity 版本<= Unity 2021.1
Unity 2019” 或更低版本,Microsoft 建议你使用“旧版内置 XR
5.Visual Studio版本
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/unity/known-issues#active-blocking-issues
使用 Visual Studio 2019 或 Visual Studio 2022 版本 >= 17.3.*
Windows 10 SDK 版本 10.0.19041.0 或 10.0.18362.0, Windows 11 SDK●
1.使用版本:17.4.1
2.win10SDK 安装
1.用vs 安装
先装vs ,再装模拟器,否则c盘找不到
2.win10 SDK 安装
6.调试
0.Unity build setting :
开发者模式,pdb 文件
1.模拟器测试:
1.安装:
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/advanced-concepts/using-the-hololens-emulator
2.所有版本:
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/advanced-concepts/hololens-emulator-archive
7.Unity 配置
https://learn.microsoft.com/zh-cn/training/modules/learn-mrtk-tutorials/1-3-exercise-configure-unity-for-windows-mixed-reality?tabs=openxr
1.BuildSetting(打包设置)
2.插件设置
1.MRTK
最新版:Unity 开发过程目前使用MRTK 版本 2.8.2、混合现实 OpenXR 插件版本 1.6.0和Unity 2020.3.42+。(https://github.com/Microsoft/MixedRealityToolkit-Unity)
https://learn.microsoft.com/zh-cn/windows/mixed-reality/develop/unity/new-openxr-project-with-mrtk
mrtk 坑:(https://learn.microsoft.com/zh-cn/windows/mixed-reality/mrtk-unity/mrtk2/release-notes/mrtk-26-release-notes?view=mrtkunity-2022-05)
2.非MRTK 导入
8.场景配置
1.https://learn.microsoft.com/zh-cn/training/modules/learn-mrtk-tutorials/1-4-configure-resources
模拟测试:https://learn.microsoft.com/zh-cn/training/modules/learn-mrtk-tutorials/1-7-exercise-hand-interaction-with-objectmanipulator
9.打包
1.unity设置
https://learn.microsoft.com/zh-cn/training/modules/learn-mrtk-tutorials/1-7-exercise-hand-interaction-with-objectmanipulator
2.vs设置
https://learn.microsoft.com/zh-cn/training/modules/learn-mrtk-tutorials/1-7-exercise-hand-interaction-with-objectmanipulator
问题:
打开工程后Vs2022 提示需要安装V143工具,按照提示安装VC143
参考文档:
10.打包失败问题
MRTK问题:
https://github.com/microsoft/MixedRealityToolkit-Unity/issues?q=is%3Aissue+is%3Aopen+unity2020
1.案例1
2022.6.17
https://github.com/microsoft/MixedRealityToolkit-Unity/issues/10656
问题:debug 能构建成功,release 失败
解决:卸载vs2022,使用vs2019
原因:vs2019默认使用了V142 工具,所以能打包成功。(vs2022默认使用vs143)