HoloLens is a head-mounted augmented reality device from Microsoft that is supported in Unreal Engine through the OpenXR APIs. This page describes how HoloLens is supported in Unreal Engine, and how to set up your environment to develop with HoloLens. Refer to Supported XR Devices for the full list of which devices Unreal Engine supports.
Microsoft provides an emulator for developing and testing apps without a physical HoloLens device. Refer to Microsoft's documentation on Input Simulation for more details on how to use the in-editor emulation.
Currently, you can develop for HoloLens devices with either the OpenXR plugin or the Windows Mixed Reality plugin.
- When you develop with the OpenXR plugin, your application can run on any device that supports the OpenXR APIs.
- When you develop with the Windows Mixed Reality plugin, your application can only run on devices that Windows Mixed Reality supports.
Developing with OpenXR for HoloLens is the recommended method, because the Windows Mixed Reality plugin is deprecated in the current version of the engine and will be removed in a future release.
Refer to the Developing with OpenXR APIs and Developing with Windows Mixed Reality APIs sections below for more details.
Developing with OpenXR APIs
To develop for HoloLens using OpenXR in Unreal Engine you must set up the following:
- Updated hardware and software. Refer to Microsoft's Installation checklist
- Developer Mode enabled on your HoloLens device
- OpenXR Runtime for HoloLens
- OpenXR, HoloLens, OpenXREyeTracker, OpenXRHandTracking, OpenXRMsftHandInteraction, and XRVisualization plugins enabled in your project
- Microsoft OpenXR plugin installed from the Marketplace and enabled
Once you're set up for developing with OpenXR, you can use the OpenXR APIs to develop for not only HoloLens devices but any device that supports the OpenXR APIs. Refer to Developing for Head-Mounted Experiences with OpenXR for more details.
Developing with Windows Mixed Reality APIs
To develop for the HoloLens 2 using Windows Mixed Reality APIs in Unreal Engine you must set up the following:
- Updated hardware and software. Refer to Microsoft's Installation checklist
- Developer Mode enabled on your HoloLens device
- Windows Mixed Reality Plugin enabled in your project.
Once you're set up for developing with the Windows Mixed Reality Plugin, you can use the Windows Mixed Reality APIs to create experiences for your HoloLens.
Getting Started with Development
After setting up your project with the OpenXR or Windows Mixed Reality plugin, follow these guides to get started developing for XR.
Mixed Reality Toolkit for Unreal
The Mixed Reality Toolkit for Unreal is a set of plugins, samples, and documentation for quickly creating immersive Unreal apps for the HoloLens 2. One component of this toolkit is UX Tools for Unreal, which provides code, blueprints, and assets for common immersive UX interactions.
The following tutorials show how to use UX Tools for Unreal in your project:
- HoloLens 2 Mixed Reality Production Unreal Community Hub Learning course
- Simple Chess App for HoloLens 2 Microsoft tutorial
Profiling
The following guides show how to profile your XR application and what to consider when you need to improve performance.