工具介绍
安装清单
windows10
- 检查更新
- 开启开发模式
Visual Studio
- directory name or volume label syntax is incorrect. — 安装放在C盘安装
- 安装设置
- 使用 C++ 的桌面开发
- 通用 Windows 平台 (UWP) 开发
- 工作负载 — USB 设备连接
已知问题 在 Visual Studio 2019 版本16.0 中调试混合现实应用时存在一些已知问题。 请确保更新到 Visual Studio 2019 版本 16.8 或更高版本。
win10 SDK
- HoloLens 2 应用 — Windows SDK 内部版本 18362 或更高版本
- Windows Mixed Reality 头戴显示设备或 HoloLens(第 1 代) — Visual Studio 2017 安装的 Windows SDK
- 如何在安装完成后扩展或者修改已经安装的vs的组件
https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2019
HoloLens 仿真器
HoloLens(第一代)仿真器(安装链接:10.0.17763.134)
❗ Hololens 1 安装vs2017就足够了
当你安装的是vs2019时需要额外安装模板
HoloLens(第一代)仿真器的说明
若要成功完成安装,需要 Visual Studio 2017。 若要使用 Visual Studio 2019 安装 HoloLens(第一代)仿真器,则需要取消选择 VS 模板,然后从 Visual Studio Marketplace 进行安装。
❤ 安装增强现实的vs模板guide https://blog.csdn.net/feinifi/article/details/107123479
选择你的引擎
Unity — 安装匹配的版本,条件允许建议安装最新版本
导入混合现实工具包 (MRTK)
- MRTK for Unity 是一款面向混合现实应用程序的开源跨平台开发工具包
- 该工具包提供跨平台的输入系统、基础组件以及用于空间交互的通用构建基块。
- MRTK 版本 2 旨在加快面向 Microsoft HoloLens、Windows Mixed Reality 沉浸式 (VR) 头戴显示设备和 OpenVR 平台的应用程序开发
- 开发文档 — https://microsoft.github.io/MixedRealityToolkit-Unity/README.html
- 安装指南 — https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/Installation.html
- 预制条件
- Mixed Reality Toolkit and Unity Package Manager
- Add MRTK to your Unity project
- Get the latest MRTK Unity packages
- Microsoft.MixedRealityToolkit.Unity.Foundation.unitypackage
- (Optional) Microsoft.MixedRealityToolkit.Unity.Extensions.unitypackage
- (Optional) Microsoft.MixedRealityToolkit.Unity.Examples.unitypackage
- (Optional) Microsoft.MixedRealityToolkit.Unity.TestUtilities.unitypackage
- (Required for version-to-version upgrades, Optional otherwise) Microsoft.MixedRealityToolkit.Unity.Tools.unitypackage
- Get the latest MRTK Unity packages
- Add MRTK to your Unity project
【 完整详尽的guide 】
- [包的导入](https://microsoft.github.io/MixedRealityToolkit-Unity/version/releases/2.5.2/Documentation/Installation.html)
- [Unity 正常激活流程](https://blog.csdn.net/linxinfa/article/details/102579820) -- **unity hub用来激活跟管理项目,unity本身作为开发环境也是要安装的。**
- 开始导入包
● 创建一个3D分类下的Unity工程
● Asset -> Import Package -> Custom Package
● import 现观的package
- Switch your Unity project to the target platform
- To create a **HoloLens application**, switch to the Universal Windows Platform:
- Open menu : File > Build Settings
- Select **Universal Windows Platform** in the **Platform** list
- Click the Switch Platform button
- Add and configure MRTK with a new scene
- Mixed Reality Toolkit -> Add to Scene and Configure
- 
- Mixed Reality Toolkit - The toolkit itself, providing the central configuration entry point for the entire framework.
- MixedRealityPlayspace - The parent object for the headset, which ensures the headset / controllers and other required systems are managed correctly in the scene.
Run the HandInteractionExamples scene in the Unity Editor
- 双击导入 Assets/MRTK/Examples/Demos/HandTracking/Scenes/HandInteractionExamples
对话框中完成导入配置
- 导入之后双击案例重新加载
点击播放按钮运行程序
模拟手动点击
- Ctrl+H — 快捷键提示
- W/S/A/D — 视线平面内前后左右
- Q/E — 平直视线平面上下移动
- 视角调整 — 按住鼠标右键移动
- 模拟手部的操作输入
- 空格 — 激活右手
- 空格按住+移动鼠标 — 移动右手
- 鼠标滚轮 — 调整右手的前后位置
- 鼠标左键 — 右手点击
- T/Y — 左右手保持显示状态
- 左右手的激活 左手左shift 右手空格
- Ctrl+鼠标移动 — 调整手的角度
Getting started tutorials
Learn about the core building blocks of MRTK
guide — https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/mrtk-101
- How to simulate input interactions in Unity editor?
- How to grab and move an object?