Add the Mixed Reality OpenXR Plugin to your existing Unity project

If you have a Unity project that's already set up for OpenXR (you have the Unity OpenXR plugin installed and configured) and you want to add the capability to target your app for HoloLens 2 or Windows Mixed Reality headsets, follow the instructions below.

To determine if your project has the Mixed Reality OpenXR plugin installed:

  1. In Unity, on the menu bar, select Edit > Project Settings.

  2. Ensure that you're on the XR Plug-in Management page with the Universal Windows Platform settings (Windows logo tab) displayed.

  3. If Microsoft HoloLens feature group is grayed out or doesn't exist, the Mixed Reality OpenXR plugin isn't installed.

    Screenshot of XR Plug-in Management window.

  4. If the plugin is installed, proceed to the section named configure the project to use the Mixed Reality OpenXR Plugin. Otherwise, continue to follow the instructions below.

Download and install the Mixed Reality Feature Tool

The Mixed Reality OpenXR Plugin comes in the form of a package for Unity. The best way to discover, update, and import feature packages is with the Mixed Reality Feature Tool. You can search packages by name or category, see their dependencies, and view proposed changes to your project's manifest file before importing.

  1. Download the latest version of the Mixed Reality Feature Tool from the Microsoft Download Center.

  2. After the download finishes, navigate to the executable file MixedRealityFeatureTool.exe and then use it to launch the Mixed Reality Feature Tool.

    Screenshot of Opening MixedRealityFeatureTool.

Import the Mixed Reality OpenXR Plugin

  1. In the Mixed Reality Feature Tool, select Start.

    Screenshot of the Mixed Reality Feature Tool opening screen.

  2. Select the Browse button (it's the "three-dot" button in the image below), then navigate to the folder containing your Unity project, and then open it.

    Open your project


    The Project Path box in the Tool must contain some 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.

    Screenshot of the Mixed Reality feature Tool Project Path screen.

  3. Select Discover Features.

    Note: You may need to wait a few seconds while the Tool refreshes the packages from the feeds.

  4. On the Discover Features page, note that there is a list of six package groups.

    The main groups of packages in the Mixed Reality Feature Tool

  5. Click the "+" button to the left of Platform Support (0 of 5) and then select the latest version of Mixed Reality OpenXR Plugin.

    Screenshot of package selections in the Mixed Reality Feature Tool.

  6. After you've made your selection(s), click Get Features.

  7. 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.

  8. 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.

  9. When you're ready to move on, select Import. On the Review and Approve page, you can review information about the packages.

  10. Select Approve.

  11. Return to the Unity Editor and click a blank area in the UI. You'll see a progress bar showing you that the package is being imported.

Configure the project to use the Mixed Reality OpenXR Plugin

See also