title | description | author | ms.author | ms.date | ms.topic | keywords |
---|---|---|---|---|---|---|
Set up a new OpenXR project with MRTK |
How to set up a new OpenXR project with MRTK. |
sean-kerawala |
vinnietieto |
6/7/2022 |
article |
mixedrealitytoolkit, mixedrealitytoolkit-unity, mixed reality headset, windows mixed reality headset, virtual reality headset, unity, MRTK, unity |
The easiest way to get your Unity project set up for mixed reality is with the Mixed Reality Toolkit (MRTK). MRTK for Unity is an open-source, cross-platform development kit designed to make it easy to build amazing mixed reality applications.
:::image type="content" source="images/MRTK_UX_Hero.png" alt-text="Infographic showing some of the features of the Mixed Reality Toolkit.":::
MRTK provides a cross-platform input system, foundational components, and common building blocks for spatial interactions. It can help you speed up your application development for Microsoft HoloLens, Windows Mixed Reality immersive (VR) headsets, and many other VR/AR devices. The project is aimed at reducing barriers to entry, enabling everyone to build mixed reality applications and contribute back to the community as we all grow.
MRTK supports a wide range of platforms, including:
-
Microsoft HoloLens
-
Microsoft HoloLens 2
-
Windows Mixed Reality headsets
-
OpenVR headsets (HTC Vive / Oculus Rift)
-
Ultraleap Hand Tracking
-
Android and iOS devices
Note
We recently introduced MRTK3, the third generation of Microsoft Mixed Reality Toolkit for Unity built on top of Unity's XR Management system and XR Interaction Toolkit, with better support for a variety of OpenXR-compliant devices and a new design language. For more information, see the MRTK3 documentation.
Note
You can also set up a new OpenXR project without MRTK.
-
In the Mixed Reality Feature Tool, select Start.
:::image type="content" source="images/mixed-reality-feature-tool.png" alt-text="Screenshot of the Mixed Reality Feature Tool opening screen.":::
-
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":::
[!NOTE] The Project Path box in the Tool must contain a value, so it inserts a backslash ("_") by default.
After you select a folder, the Tool checks to ensure that it's a valid Unity project folder.
:::image type="content" source="images/007-project-path.png" alt-text="Screenshot of the Mixed Reality feature Tool Project Path screen.":::
-
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 (0 of 10) and then select the latest version of Mixed Reality Toolkit Foundation.
[!NOTE] The Mixed Reality Toolkit Foundation package is the only package that must be imported and configured in order to use MRTK with your project. This package includes the core components required to create a mixed reality application.
-
Click the "+" button to the left of Platform Support (0 of 5) and then select the latest version of Mixed Reality OpenXR Plugin.
:::image type="content" source="images/008-package-selections.png" alt-text="Screenshot of package selections in the Mixed Reality Feature Tool.":::
-
After you've made your selection(s), click 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, click OK.
-
On the Import Features page, the left-side column, Features, displays the packages you just selected. The right-side column, Required dependencies, displays any dependencies. You can click 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.
-
Return to the Unity Editor and click a blank area in the UI. You'll see a progress bar showing you that your packages are being imported.
You're now ready to begin developing with OpenXR in Unity!
Check out the OpenXR Mixed Reality samples repo for sample unity projects showcasing how to build Unity applications for HoloLens 2 or Mixed Reality headsets using the Mixed Reality OpenXR plugin.