|
1 | 1 | --- |
2 | | -title: Deploy an MRTK3 project to HoloLens 2 |
| 2 | +title: Deploy to HoloLens 2 |
3 | 3 | parent: Test and experience overview |
4 | | -nav_order: 2 |
| 4 | +nav_order: 4 |
5 | 5 | --- |
6 | 6 |
|
7 | | -# Deploy an MRTK3 project to HoloLens 2 |
| 7 | +# Deploy to HoloLens 2 |
8 | 8 |
|
9 | 9 | This page describes how to deploy your Unity Project with MRTK3 onto a HoloLens 2. |
10 | 10 |
|
11 | 11 | > [!NOTE] |
12 | 12 | > We strongly recommend using [Holographic remoting](streaming.md) for rapid iteration and testing on HoloLens 2, which allows for instant testing on the device without the need for compile + deploy. |
13 | 13 |
|
14 | | -## Deployment Pre-requisites |
| 14 | +## Deployment Prerequisites |
15 | 15 |
|
16 | | -- Add MRTK to your project and ensure your [project settings](../getting-started/setting-up/setup-new-project.md#5-configure-openxr-related-settings) are configured correctly to use the OpenXR pipeline and MRTK's feature set. **These features are required to deploy your project onto your HoloLens**. |
| 16 | +1. Add MRTK to your project and ensure your [project settings](../getting-started/setting-up/setup-new-project.md#5-configure-openxr-related-settings) are configured correctly to use the OpenXR pipeline and MRTK's feature set. **These features are required to deploy your project onto your HoloLens**. |
| 17 | + |
| 18 | + > [!NOTE] |
| 19 | + > If starting from our [template project](../getting-started/setting-up/setup-template.md), these project settings should already be configured for you. |
| 20 | +
|
| 21 | +1. Navigate to **File > Build Settings**. |
| 22 | + |
| 23 | +1. Under **Platform**, select **Universal Windows Platform**. Switch the platform to **Universal Windows Platform**, and wait for the operation to finish. |
| 24 | + |
| 25 | +1. Navigate to **Edit > Project Settings**. |
| 26 | + |
| 27 | +1. Under **Project Settings**, navigate to **XR Plug-in Management** and enable **OpenXR** under both the **Standalone** and **UWP** tabs. Under each tab, ensure that **Initialize XR on Startup** is selected and that the **Windows Mixed Reality feature group** under **Standalone** and the **Microsoft HoloLens feature group** under **UWP** are enabled. |
| 28 | + |
| 29 | + > [!NOTE] |
| 30 | + > If you don't see these **feature groups**, ensure the **Mixed Reality OpenXR Plugin** is imported into your project. |
| 31 | +
|
| 32 | + For standalone: |
| 33 | + |
| 34 | + [](../images/standalone-xr-plug-in-management.png) |
| 35 | + |
| 36 | + For UWP: |
| 37 | + |
| 38 | + [](../images/uwp-xr-plug-in-management.png) |
| 39 | + |
| 40 | + > [!NOTE] |
| 41 | + > A yellow warning icon may appear after checking the **OpenXR** option. Click that icon to open the **OpenXR Project Validation** tool. Click **Fix all** and ignore the interaction profile issue that can't be auto-fixed. The profiles will be added in the step below. |
| 42 | +
|
| 43 | +1. Under **Project Settings**, navigate to **XR Plug-in Management > OpenXR > Interaction Profiles** and ensure the following profiles are listed based on the MRTK features you'd like to use: |
| 44 | + |
| 45 | + | Profile | MRTK | |
| 46 | + |---------|------| |
| 47 | + | Eye Gaze Interaction Profile | For eye tracking input | |
| 48 | + | Hand Interaction Profile | For articulated hand input | |
| 49 | + | Microsoft Motion Controller Profile | For controller input | |
| 50 | + |
| 51 | +1. Under **Project Settings**, navigate to **XR Plug-in Management > OpenXR > OpenXR Feature Groups** and ensure the following features are checked under **All Features** based on the MRTK features you'd like to use (these are likely to be already checked after selecting the **feature groups** above): |
| 52 | + |
| 53 | + | Feature | MRTK | |
| 54 | + |---------|------| |
| 55 | + | Hand Tracking Subsystem | For rendering the articulated hand joints | |
| 56 | + | Mixed Reality Features | For general HoloLens and WMR support | |
| 57 | + | Motion Controller Model | For rendering the motion controller models | |
| 58 | + |
| 59 | + For standalone: |
| 60 | + |
| 61 | + [](../images/standalone-openxr.png) |
| 62 | + |
| 63 | + For UWP: |
| 64 | + |
| 65 | + [](../images/uwp-openxr.png) |
| 66 | + |
| 67 | + > [!NOTE] |
| 68 | + > You can enable additional features as needed, but in-scene support for them will come from other packages, like AR Foundation. |
| 69 | +
|
| 70 | +1. For HoloLens 2, we recommend that you set **Depth Submission Mode** to 16-bit in the settings above. |
| 71 | + |
| 72 | +1. For immersive headsets, you can use 24-bit depth submission. See the [Microsoft development docs for Unity](https://learn.microsoft.com/windows/mixed-reality/develop/unity/recommended-settings-for-unity?tabs=openxr#enable-depth-buffer-sharing) for more info. |
| 73 | + |
| 74 | +1. A yellow warning icon or red error icon may appear during this process. Click that icon to open the **OpenXR Project Validation** tool. Select **Fix All** to address the issues. There may be several items to address. For more information about Windows App Capabilities, see [App capability declarations](https://learn.microsoft.com/windows/uwp/packaging/app-capability-declarations) |
| 75 | + |
| 76 | +## Using platform controller models |
17 | 77 |
|
18 | 78 | > [!NOTE] |
19 | | -> If starting from our [template project](../getting-started/setting-up/setup-template.md), these project settings should already be configured for you. |
| 79 | +> **Controller models** are stored in a format that is not natively supported by Unity. To use MRTK Controller Visualization on WMR, you will need to make sure you have the following package in your project: |
| 80 | +> |
| 81 | +> - [glTFast importer](https://github.com/atteneder/glTFast) which enables the use of glTF asset files in Unity and allows the use of MRTK Controller Visualization on WMR |
| 82 | +> |
| 83 | +> If you started with the MRTK3 template project, this package has already been included in the project. |
| 84 | +> If not, an MRTK project validation rule will help you import the package. |
20 | 85 |
|
21 | 86 | ## Deploying to Device |
22 | 87 |
|
23 | | -1. After you have the project configured, proceed to [Build the Unity Project](/windows/mixed-reality/develop/unity/build-and-deploy-to-hololens#build-the-unity-project). |
| 88 | +1. After you have the project configured, proceed to [Build the Unity Project](https://learn.microsoft.com/windows/mixed-reality/develop/unity/build-and-deploy-to-hololens#build-the-unity-project). |
24 | 89 |
|
25 | | -1. Once built, you'll need to deploy the project through [Visual Studio](/windows/mixed-reality/develop/advanced-concepts/using-visual-studio?tabs=hl2). |
| 90 | +1. Once built, you'll need to deploy the project through [Visual Studio](https://learn.microsoft.com/windows/mixed-reality/develop/advanced-concepts/using-visual-studio?tabs=hl2). |
0 commit comments