Can magic leap 2 detect physical room lights?

Wondering if this is possible to detect a light and do something in your virtual world when its detected?
Is there tutorials somewhere for this?


The Magic Leap 2 has a light sensor that can be accessed using the standard android APIs. To access the values you may need to use a Java plugin that retrieves the sensor data from the device, then use a Unity C# script that calls the Java plugin to get the sensor value. You can also try searching for an existing plugin / project on the Unity asset store or GitHub.

Are there tutorials for this that you know of?

I saw this " * Raycast, Mobile App, Hand Meshing, Light Tracking samples have been removed from the MagicLeapUnityExamples project as their APIs are not currently supported on the ML2." on the sdk release. 0.53.0 - Unity SDK Release Notes | MagicLeap Developer Documentation
Do you think that your idea is a work around?

Janikows, The samples were removed in that OS version because we were transitioning from the Magic Leap specific API to the more generic Android environment sensors API:
Environment sensors  |  Android Developers.

You may also be able to use Unity's built-in InputSystem as a LightSensor input

I do not have any tutorial recommendations but if you find any tutorials that you think worked particularly well, let us know..