Skip to main content

50 docs tagged with "Input"

View All Tags

API Overview

Magic Leap's Eye Tracking data is retrieved in two ways.

API Overview

This section provides information on the Gesture Classification API and how to enable it inside your application.

API Overview

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.

Audio Capture

An overview of the audio capture demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.

Bluetooth

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

C-API Samples Overview

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.

Controller

An overview of the controller's buttons and sensors, touchpad gestures, and important changes from the Magic Leap 1 SDK.

Controller

An overview of the controller demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.

Controller Gesture Events

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.

Controller Input Events

This section demonstrates how to use Unity's Input System to access input events from the Magic Leap 2 controller.

Controller Input Values

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.

Controller Overview

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.

Examples

This section demonstrates how to use the Gesture Classification API.

Eye Tracking

An overview of the eye tracking demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.

Eye Tracking Overview

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.

Eye Tracking Tracked Pose Driver

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.

Generic Eye Tracking Data

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.

Gesture Classification

An overview of the gesture classification demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.

Hand Tracking

An overview of the hand tracking demo scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.

Hand Tracking Overview

This section provides information on the core Hand Tracking API and how to enable it inside your applications.

Handling Tracking Loss Events

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 Overview

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.

HMD Tracked Pose Driver

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).

Magic Leap Eye Tracking Data

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

Migrating from ML1

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.

Quick Start

Instructions on how to download the Magic Leap MRTK Template Project

Runtime Configuration

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.

Runtime Voice Intents Example

This section provides details on how developers can create voice commands at runtime. This feature can be helpful when loading content dynamically.

Simple Example

This section includes code examples for developers to reference when implementing voice input in their applications.

Start/Stop Input

This section provides details on how developers can start and stop tracking voice intents inside their applications.

Voice Input System Settings

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.

Voice Intents Overview

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.

Voice Slots

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.

WebView

An overview of the WebView scene included in the Magic Leap 2 Examples Project, which uses Unity's XR Interaction Toolkit.