API Overview
Controller API Overview
Controller API Overview
Magic Leap's Eye Tracking data is retrieved in two ways.
This section provides information on the Gesture Classification API and how to enable it inside your application.
Namespace
This guide provides detailed instructions and examples on how to use the MagicLeap's MLPowerManager API for managing power states and properties of components in Unity. The guide first explains the concept of power states, showing how to get all available states and retrieve a specific state for a device. It then delves into the process of setting a power state with thorough examples. The guide proceeds to explain how to get and update the properties of a component, focusing on different aspects like battery info, battery level, charging state, and connection state. Lastly, it touches on how to handle power management events such as errors, state changes, and property changes through callbacks. By following this guide, developers can efficiently control and manage Magic Leap 2's power states and properties inside their Unity Application.
An overview of the audio capture demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.
Magic Leap 2 provides support for Android’s default Bluetooth stack which includes both Classic Bluetooth and Bluetooth Low Energy. Using Bluetooth, Magic Leap 2 can create personal area networks to send and receive data with nearby Bluetooth devices. Integration with Android’s standard Bluetooth API means that users can connect existing Bluetooth devices that are supported on Android without any modification. Bluetooth devices can be connected in Magic Leap 2’s system settings using the steps below
The list below contains descriptions of each of the C-API samples available in the ML Hub. The README.md files of each example contain instructions on how to build, install and uninstall the example, as well as its expected behavior and GUI.
Instructions on how to add Magic Leap support to an existing MRTK 3 Project
An overview of the controller's buttons and sensors, touchpad gestures, and important changes from the Magic Leap 1 SDK.
An overview of the controller demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.
This section demonstrates how to use Magic Leap's Gesture subsystem to receive the input events that are triggered when the user performs a gesture on the controllers touch pad.
This section demonstrates how to use Unity's Input System to access input events from the Magic Leap 2 controller.
Using Unity Input System, you can read Magic Leap 2's controller input directly using the InputAction.ReadValue() method. View Unity's Documentation to learn more about Unity Input System Unity's Input System.
The Magic Leap 2's controller input can be accessed using Unity's Input System. The Magic Leap 2 SDK includes predefined action mappings, so developers can access controller input in a familiar way.
Unity Input System - Tracked Pose Driver
Instructions on how to create a new MRTK 3 project compatible with Magic Leap 2
Introduction
This section demonstrates how to use the Gesture Classification API.
An overview of the eye tracking demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.
If your Application collects, stores, transfers or otherwise uses data off the Magic Leap 2 device that is received via this API, then you must comply with the Magic Leap 2 Eye Tracking Data Transparency Policy.
If your Application collects, stores, transfers or otherwise uses data off the Magic Leap 2 device that is received via this API, then you must comply with the Magic Leap 2 Eye Tracking Data Transparency Policy.
If your Application collects, stores, transfers or otherwise uses data off the Magic Leap 2 device that is received via this API, then you must comply with the Magic Leap 2 Eye Tracking Data Transparency Policy.
An overview of the gesture classification demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.
Overview
An overview of the hand tracking demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.
This section provides information on the core Hand Tracking API and how to enable it inside your applications.
Overview
If the Magic Leap can't locate its position in an environment, it experiences "tracking loss". The Magic Leap 2 lets developers manage their own tracking loss behavior -- some developers may want to pause the update loop and display a splash image, while others may want the app to continue playing.
Head tracking uses cameras on the headset to track the movement of the user’s head. This allows the headset to display 3D content at a specific point in the user's viewing area.
In order for your unity camera to track with head pose, it needs to have the Tracked Pose Driver component with the following settings. Depending on your app setup, you can either add this component to the main camera yourself, or get it through prefabs like the XRRig (from the XR Interaction Toolkit) or the "Main Camera" (from our SDK package).
To obtain Magic Leap device specific features such as checking the eye tracking FixationConfidence status or if the user is blinking use Magic Leap's InputSubsystem.Extensions
Information about MRTK 3 settings for Magic Leap
An overview and walkthrough guide for using the Magic Leap XR Keyboard.
Upgrade to Magic Leap's new Controller APIs
Upgrade to Magic Leap's new Eye Tracking APIs
This article provides an overview on the changes that were made to the Magic Leap SDK and how to access Magic Leap 1 equivalent features on the Magic Leap 2.
Using MRTK with Magic Leap 2 in Unity
Instructions on how to get started with Magic Leap MRTK3
Overview of Microsoft's Mixed Reality ToolKit
Instructions on how to download the Magic Leap MRTK Template Project
This section provides details on how developers can create and register voice commands dynamically at runtime. This feature can be helpful when loading content dynamically.
This section provides details on how developers can create voice commands at runtime. This feature can be helpful when loading content dynamically.
Setting Up MRTK with Magic Leap 2 for Unity
This section includes code examples for developers to reference when implementing voice input in their applications.
This section provides details on how developers can start and stop tracking voice intents inside their applications.
The Voice Intent API will only register voice commands if Voice Input is enabled inside the Magic Leap 2's System Settings (Settings > Magic Leap Inputs > Voice). This section demonstrates how to check if a user has enabled Voice Input.
Magic Leap 2 allows users to trigger events using custom verbal commands called Voice Intents. This section outlines how to set up Voice Intents in your project, example scripts, and an API overview.
A Slot is a placeholder string for a set of potential values. The utterance will use one of the values and the developer can have different logic based on which value was spoken. To indicate use of a slot, put the slot name within { } for the command.
An overview of the WebView scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.