Skip to main content
Version: 17 Jan 2024

Magic Leap OpenXR Unity

This section includes information on using the Magic Leap OpenXR Unity SDK to create Magic Leap 2 applications. These guides include information regarding Unity's Generic OpenXR implementation and how to integrate Magic Leap Specific features.

πŸ“„οΈ Overview

The transition to OpenXR involves the phasing out of MLSDK in favor of OpenXR extensions. To align with this change, Magic Leap’s Unity SDK is shifting from Unity's platform specific XR Plugin (ie: com.unity.xr.magicleap) to Unity's OpenXR Plugin (com.unity.xr.openxr). This shift is accompanied by the addition of new OpenXR Features and API for accessing the functions previously defined by MLSDK C-APIs. This document will outline the rationale behind the move to OpenXR, detail the steps involved in the migration process, and provide insights into the changes and enhancements introduced by this transition.

πŸ“„οΈ Near Clip Policy

In order for virtual content to be rendered comfortably, Magic Leap 2 enforces a minimum clipping plane. By default this value is .37 meters or 37 centimeters but can be adjusted by the user inside the device settings (Settings > Display > Advanced > Clipping Plane) based on their comfort preferences. Applications can choose if they want to use the near clipping plane distance set by the user or if it should remain at the default minimum value. If the Camera's Near Clip Plane value is set to lower than the enforced range it will be reverted to the enforced value.