Skip to main content

35 docs tagged with "OpenXR"

View All Tags

Android Manifest

This guide explains the essential elements and attributes that you need to include in your Android Manifest file to deploy an OpenXR application to the Magic Leap 2 device. The Android Manifest file is an XML file that describes the basic characteristics of your application, such as its name, icon, permissions, features, and activities. It is located in the root directory of your project and has the name AndroidManifest.xml. For more information about the general syntax and structure of the Android Manifest file, you can refer to the Android Developer Guide.

Application Development Overview

For developers familiar with C++ but new to OpenXR, check out the OpenXR Tutorial by Khronos, the organization behind the OpenXR standard. This tutorial serves as a step-by-step guide, introducing you to essential OpenXR APIs and concepts. You will learn how to set up your development environment, initialize OpenXR, render graphics, handle input, and explore the OpenXR features and extensions. Learn More

Building via Command Line

This section outlines the steps required to build the Magic Leap OpenXR Samples using the build.py script from the command line. Before attempting to build the samples, please complete the environment setup steps in Environment Setup. The build script uses gradle to build each of the applications.

Environment Setup

This guide walks you through setting up your environment for native development on Magic Leap 2. By the end of the guide, you will have everything necessary to build and run the Magic Leap OpenXR samples, allowing you to explore the capabilities of OpenXR on Magic Leap 2 and develop your own AR applications.

Examples Project

An examples project is available to download from ML Hub that demonstrates how to use several of the Magic Leap plugins included in the Magic Leap Unreal sdk.

Hand Interaction

Hand joint pose tracking is provided by Epic's OpenXRHandTracking plugin, but this does not include functionality for detecting hand gestures.

HelloXR Sample Application

Khronos' OpenXR SDK Source repo includes the helloxr sample app. This application can be used as a starting point to understand the basic functionality of OpenXR on a given device.

Improve Visual Stability

For the Magic Leap Native API (C-API) article about visual stability, see Improve Visual Stability (C-API).

Magic Leap OpenXR

The MagicLeap OpenXR plugin is required by all other plugins in the SDK that wrap OpenXR apis.

Magic Leap OpenXR Samples

The Magic Leap Hub (ML Hub) includes a set of samples that demonstrate some of Magic Leap's device specific features. These samples can be downloaded via ML Hub's Package Manager and then built using Android Studio or a command line interface using the build.py script.

Marker Tracking

You can use the "Magic Leap Marker Tracking" plugin to detect and locate fiducial markers in your project.

Migrating to OpenXR

In order for an existing Magic Leap 2 Unity application to continue working under OpenXR, here are the minimum steps required:

MLSDK to OpenXR/Android APIs

This page includes a list of the MLSDK APIs and their equivalents available through OpenXR Extensions and standard Android APIs.

Object Alignment

Object Alignment is a sample application that demonstrates how to attach large scale 3D content, such as digital twin meshes, to a spatial localization map such that the 3D content remains stuck to the world as the user moves around a large space.

OpenXR Overview

We are proud to announce that Magic Leap 2 is now conformant with OpenXR. As an early contributor in the development of OpenXR, we're committed to building an open and accessible augmented reality (AR) ecosystem that benefits enterprises and developers across industries.

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.

Plane Classification

This example uses the OpenXR Unity API. For a previous version using the Unity MLSDK, see this page.

Planes Overview

Magic Leap 2 tries to understand its environment using feature points and planes.

Planes Query

Note: This example uses the OpenXR version of the Magic Leap 2 Unity SDK. For a previous version using the Unity MLSDK, see here.

Rendering Extensions Overview

This section includes information about the Magic Leap 2 OpenXR Rendering Extensions Feature that will make your content appear more robust.

Start and Stop Application Simulator

This section walks through the options you have for starting a session in Application Simulator that you can use to run your app. You can use ML C API or Unity apps.

Supported OpenXR Features

These Magic Leap 2 features are supported for Unreal Engine 5.3 with Magic Leap 2 SDK for Unreal Engine 5 (Magic Leap Unreal SDK).

Troubleshooting

This section reviews different steps you can take to troubleshoot problems you may encounter when using Application Simulator. Topics covered include:

XR Origin & ML Rig

This section provides information on how to create a Player Rig that is compatible with Magic Leap 2 and is driven by the user's head and controller movement controller. This can be done by either: