For the smoothest migration, we recommend that you complete all the steps in this article in the order presented. Here’s an overview of the major steps:
If you’re already using MRTK, we suggest that the first step in your migration should be to run the Mixed Reality Feature Tool and update to the latest stable version of MRTK.
[!NOTE] The descriptions and images in this section are based on the most recent version of the Tool. If the instructions don’t match what you’re seeing, check to ensure that you’re not using an older version of the Tool.
Open the Microsoft Mixed Reality Feature Tool and then click the Start button.
:::image type=”content” source=”images/001-mr-feature-tool.png” alt-text=”Mixed Reality Feature Tool”:::
Select the Browse button (it’s the “three-dot” button in the image below), then navigate to your project, and then open it.
:::image type=”content” source=”images/002-open-your-project.png” alt-text=”Open your project”:::
Select Discover Features.
Note: You may need to wait a few seconds while the Tool refreshes the packages from the feeds.
On the Discover Features page, note that there is a list of six package groups.
:::image type=”content” source=”images/003-mrft-groups.png” alt-text=”The main groups of packages in the Mixed Reality Feature Tool”:::
Click the “+” button to the left of Mixed Reality Toolkit and then select the latest version of Mixed Reality Toolkit Foundation.
By doing this upgrade while still using Unity 2019, you can view the MRTK Project Configurator and see any “deprecated API” warnings about how to get current. The warnings will tell you what to change. If you don’t do this MRTK upgrade first, the old API might be gone and you won’t have those warnings.
Learn more about the Mixed Reality Feature Tool.
After you’ve updated MRTK, you can instruct Unity 2019 to use XR Plug-in Management.
As this point, you might see a button labeled Install XR Plugin Management button. If so, continue on with the steps below. If you already have the XR management system installed, you can skip the rest of the steps in this section and continue on to the next section, “Choose ‘Windows Mixed Reality’.”
A dialog named Built in VR Detected appears and asks if you want to remove the built-in VR package. Click Ok.
:::image type=”content” source=”images/002-built-in-vr.png” alt-text=”Message about Built-in VR being detected.”:::
We’re not quite ready to install OpenXR yet, but this next set of steps helps you to get clean on any APIs that were only available and supported on the “Built-in XR” path. (If you’re using MRTK, most of this is abstracted for you.)
[!NOTE] When you use XR Plug-in Management in Unity 2019, Azure Spatial Anchors (ASA) isn’t supported. If your project has ASA code, you won’t be able to test it until after you’ve installed Unity 2020. Otherwise, you should be able to validate your app at this stage.
You’ll see a dialog asking if you want to upgrade your project to a newer version of Unity. Click CONFIRM.
If you were previously using AR Foundation 2.0, the project will move you forward automatically to AR Foundation 4.0.
Use the Mixed Reality Feature Tool to import the packages below.
After Unity reopens again, you can set OpenXR as the runtime:
On the menu bar, select Edit > Project Settings.
Look in the left-side column and ensure that you’re on the XR Plug-in Management page and in the Universal Windows Platform tab (there’s an image of the Windows logo on the tab).
In the Plug-in Providers list, select OpenXR.
:::image type=”content” source=”images/010-plug-in-management.png” alt-text=”Plug-in management”:::
Note that there’s now a yellow warning triangle next to OpenXR. Hover your cursor over the triangle, then read the message in the popup, and then select the triangle.
:::image type=”content” source=”images/011-warning-msg.png” alt-text=”OpenXR warning message”:::
In the OpenXR Project Validation window, there are several issues listed. Select the Fix All button.
:::image type=”content” source=”images/012-lock-input-fix.png” alt-text=”Project Validation window”:::
One issue remains and tells you that you must add at least one interaction profile. To do so, click Edit. This takes you to the settings for the OpenXR plugin in the Project Settings window.
:::image type=”content” source=”images/013-openxr-features.png” alt-text=”OpenXR Plugin settings”:::
Select the plus sign (+) button three times, each time choosing a different profile:
:::image type=”content” source=”images/022-add-profile-button.png” alt-text=”Add Profiles plus-sign button”:::
Eye Gaze Interaction Profile
Microsoft Hand Interaction Profile
Microsoft Motion Controller Profile
:::image type=”content” source=”images/014-profiles.png” alt-text=”Interaction profiles”:::
If the Eye Gaze Interaction Profile, or any other profile, appears with a yellow triangle next to it, select the triangle, and then in the OpenXR Project Validation window, click the Fix button.
:::image type=”content” source=”images/014B-fix-eye-gaze-profile.png” alt-text=”Eye gaze interaction profiles”:::
In the OpenXR Feature Groups section, select Microsoft HoloLens, and then select Hand Tracking and Motion Controller Model if they’re not already selected.
:::image type=”content” source=”images/015-features-selected.png” alt-text=”OpenXR feature groups”:::
Click the Depth Submission Mode drop down and then select Depth 16 Bit.
:::image type=”content” source=”images/017-depth-sixteen-bit.png” alt-text=”Debpth submission mode”:::
Your project is now fully migrated.