Exercise - Import and configure resources
Install the Mixed Reality Feature Tool
To import the Mixed Reality Toolkit into your project, you'll use the Mixed Reality Feature Tool. The Mixed Reality Feature Tool allows developers to discover, update, and import feature packages. You can search packages by name or category, see their dependencies, and view proposed changes to your project's manifest file before importing.
Download the latest version of the Mixed Reality Feature Tool from the Microsoft Download Center.
After the download finishes, open the MixedRealityFeatureTool.exe file and use it to launch the Mixed Reality Feature Tool.
Note
Before you can run the Mixed Reality Feature Tool, you might need to install the .NET 6.0 runtime.
Import the MRTK Unity foundation package
In the Mixed Reality Feature Tool, select Start.
Select the Browse button (it's the "three-dot" button in the image below), then navigate to your project, and then open it.
After you select a folder, the Tool checks to ensure that it's a valid Unity project folder.
Select Discover Features.
Note
You might 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 available package groups.
Select the + button to the left of Platform Support (0 of 5) and then select the latest version of Mixed Reality OpenXR Plugin.
Select the Select All button to the right of MRTK3 so that all features are selected.
Note
If you see any packages that are marked as deprecated, you should remove them and make sure that Settings > Feature > Show deprecated packages is deselected.
After you've made your selection(s), select Get Features.
Select Validate to validate the packages you selected. You should see a dialog that says No validation issues were detected. When you do, select OK.
On the Import Features page, the left-side column, Features, displays the packages you selected. The right-side column, Required dependencies, displays any dependencies. You can select the Details link for any of these items to learn more about them.
When you're ready to move on, select Import. On the Review and Approve page, you can review information about the packages.
Select Approve.
Select Exit.
Return to the Unity Editor and select a blank area in the UI. You'll see a progress bar showing you that your packages are being imported.
Configure the Unity project
After Unity has imported the packages, a warning appears asking if you want to enable the backends by restarting the editor. Select Yes.
Unity will ask you about updating methods in the XR InteractionLayerMask, select the I Made a Backup, Go Ahead! button and wait for Unity to restart.
On the menu bar, select Mixed Reality > Project > Apply recommended project settings for HoloLens.
On the menu bar, select Edit > Project Settings.... Select XR Plugin-in Management. Ensure that Initialize XR on Startup is selected, and then, under Plugin Providers, select Open XR.
The OpenXR Plugin loads, and then two items appear underneath OpenXR. Select the first one, Microsoft HoloLens feature group. Select the yellow exclamation mark.
Select Fix All.
Some warnings may remain. Ignore them for now.
Select OpenXR under XR Plug-in Management.
Under Interaction Profiles, add Microsoft Hand Interaction and Eye Gaze Interaction Profile if they haven't been added.
Make sure Microsoft Hololens on the left is selected and Hand Tracking, Mixed Reality Features, and Motion Controller Model on the right are selected.
Select the warning sign next to Eye Gaze Interaction Profile to bring back the Project Validation window. Make sure you're on the UWP platform tab (the tab displays the Windows logo), and then select Fix All to resolve the validation issues. Note that there may be issues that remain after you select Fix All. In that case, select Fix All again, ignore any issues that are marked Scene specific, and then read the recommendations for the remaining issues (if any) and make any changes you want.
Under Project Settings, Select MRTK3, then check if there is a valid Profile. If there is none, search for MRTKProfile in the project's Packages (Packages/org.mixedrealitytoolkit.core/Configuration/Default Profiles/MRTKProfile.asset) and assign it to the Profile.
Configure project settings
In the menu bar, select Edit > Project Settings.
In the Project Settings window's left-side column, select Player.
Note that in the Player window, the Product Name is "MRTK Tutorial." This is taken from your project name and will be the name displayed in the HoloLens Start menu.
Tip
To make the app easier to locate during development, add an underscore in front of the name to sort it to the top of any list.
Select the Publishing Settings drop down, and then in the Package name field, enter a suitable name; for example, MRTK-Tutorials-Getting-Started:
Note
The package name is the unique identifier for the app. If you want to avoid overwriting previously installed versions of the app with the same name, you should change this identifier before deploying the app.
Close the Project Settings window.
Create the scene and configure MRTK
In the menu bar, select File > New Scene. Select the Basic (Built-in) option, then Create.
In the Project window, navigate to the Packages > MRTK Input > Assets > Prefabs folder. Drag the prefab MRTK XR Rig into the scene Hierarchy.
Remove the Main Camera game object because MRTK XR Rig game object already contains a camera.
Add the MRTK Input Simulator (Packages > MRTK Input > Simulation > Prefabs) prefab to your scene.
Note
This step is optional, but required for in-editor simulations.
In the menu bar, select File > Save As....
Navigate to the Assets > Scenes folder, then name your project, and then save your project.