HoloLens 2 to Magic Leap 2 Porting Guide
Porting your MRTK-based HoloLens 2 application to Magic Leap 2 requires only a few adjustments to your Unity project environment. Using the Magic Leap 2 Unity SDK and MRTK Magic Leap 2 plugin according to this guide will get your project running on the Magic Leap 2 with minimal effort.
The MRTK Magic Leap 2 plugin currently only supports MRTK v2.8.
Platform Overview
There are several key differences between the HoloLens 2 and Magic Leap 2 MRTK development environment:
HoloLens 2 | Magic Leap 2 | |
---|---|---|
Architecture | ARM64 | x86_64 |
Unity editor version | 2021.3 LTS | 2022.2.x or newer |
Render Pipeline | Lightweight Render Pipeline | Universal Render Pipeline |
Build Target | Universal Windows Platform | Android |
Interaction method | Hand tracking | Controller, Hand tracking |
XR Plugin Managment | OpenXR | Magic Leap |
MRTK Feature Support
HoloLens 2 | Magic Leap 2 | |
---|---|---|
Spatial Mapping | ✓ | ✓ |
Hand Tracking | ✓ | ✓ |
Voice | ✓ | ✓ |
Eye Tracking | ✓ | ✓ |
Controller | ✓ | |
System Keyboard | ✓ | |
Plane Detection | ✓ | |
Hand Mesh | ✓ |
Porting Prerequisites
- Your project must use Microsoft MRTK v2.8
- You have downloaded and installed the latest compatible versions of the Magic Leap Unity SDK, MRTK Magic Leap 2 package, and Unity editor as outlined in the guides below.
- If your project uses the Hololens System keyboard, you will need to replace the system keyboard calls with MRTK's
NonNativeKeyboard
alternative.
Update your Unity Project for Magic Leap 2
Part 1: Update and configure your Unity project settings
- Update your Unity editor version to 2022.3.0 or higher.
- Download and install the latest compatible versions of the Magic Leap OS and Magic Leap SDK. Use this compatibility matrix to check version compatibility.
- Open your Unity project in the new version of the Unity editor and complete the steps in the Configure Project Settings Unity guide.
- Follow the Render Pipeline Settings Unity guide to change your render pipeline settings to the Universal Render Pipeline.
Part 2: Implement the MRTK - Magic Leap 2 plugin
- Follow the Set Up MRTK for Magic Leap 2 guide to configure MRTK to work with the MRTK Magic Leap 2 plugin.
Part 3: Taking Advantage of Magic Leap 2 Features
Controller
An often-overlooked input modality, the Controller offers interaction options beyond standard HandTracking. Usage of a Controller in an AR application can lead to better end-user comfort over a longer period of time, eliminating the fatigue of a typical hand-tracking-exclusive application.
Expanded Field of View
With an increased horizontal and vastly-expanded vertical field of view, an AR app benefits by being able to see human-sized virtual content from just a few feet away. Moving from the Hololens 2 to a Magic Leap 2, the difference will be noticeable immediately.
Compute power
The Magic Leap 2 uses an x86_64
-based architecture, with processors that are able to compute far more complex geometry, shaders, and textures at smoother framerates than previous-generation AR devices.