工具介绍


002 工具安装 - 图1

安装清单


windows10

  1. 检查更新

image.png

  1. 开启开发模式

Visual Studio

  • directory name or volume label syntax is incorrect. — 安装放在C盘安装
  • 安装设置

image.png

  • 使用 C++ 的桌面开发
  • 通用 Windows 平台 (UWP) 开发
    • 工作负载 — USB 设备连接

image.png
已知问题 在 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
image.png

选择你的引擎

完整详尽的guide

  1. - [包的导入](https://microsoft.github.io/MixedRealityToolkit-Unity/version/releases/2.5.2/Documentation/Installation.html)
  2. - [Unity 正常激活流程](https://blog.csdn.net/linxinfa/article/details/102579820) -- **unity hub用来激活跟管理项目,unity本身作为开发环境也是要安装的。**

image.png

  1. - 开始导入包
  1. 创建一个3D分类下的Unity工程
  2. Asset -> Import Package -> Custom Package
  3. import 现观的package
  1. - Switch your Unity project to the target platform
  2. - To create a **HoloLens application**, switch to the Universal Windows Platform:
  3. - Open menu : File > Build Settings
  4. - Select **Universal Windows Platform** in the **Platform** list
  5. - Click the Switch Platform button
  6. - Add and configure MRTK with a new scene
  7. - Mixed Reality Toolkit -> Add to Scene and Configure
  8. - ![image.png](https://cdn.nlark.com/yuque/0/2021/png/584886/1609891258095-1a47c6aa-205f-486c-b0bf-149417b25c6e.png#align=left&display=inline&height=82&margin=%5Bobject%20Object%5D&name=image.png&originHeight=163&originWidth=304&size=21903&status=done&style=none&width=152)
  9. - Mixed Reality Toolkit - The toolkit itself, providing the central configuration entry point for the entire framework.
  10. - 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
  • image.png对话框中完成导入配置
  • 导入之后双击案例重新加载
  • image.png点击播放按钮运行程序

模拟手动点击


  • 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?