How to enter Standby mode from a Unity app on Magic Leap 2

We are currently developing a Unity application for Magic Leap 2 using the following environment:

  • Unity Editor version: 2022.3.14f1

  • ML2 OS version: 1.7.0

  • Unity SDK version: 1.12.1

  • Host OS: Windows

We are developing an application for the Magic Leap 2 using Unity, and we would like to control the device’s power state based on our application’s logic.

Specifically, we have two questions:

  1. Entering Standby Mode: Is there a provided API or method to programmatically put the device into Standby mode from a C# script at a specific point within our application?

  2. Exiting Standby Mode: Similarly, is it possible to programmatically wake the device up from Standby mode, also from a C# script?

We have reviewed the developer documentation on “Sleep Mode” but could not find a specific description of how to actively perform these actions from a Unity script.

Any guidance you could provide on these matters would be greatly appreciated.

Hey @hiroumi ,

The Magic Leap 2 does not allow you to control the devices power state from a Unity App, so unfortunately, there is no way to do this.

Best,
Corey

Hello @cfeist ,

Thank you for the information.
I understand that it’s not possible to control the power state from a Unity app.

Best regards,

Hiroumi