Adjust brightness on runtime

Hey guys,
I was wondering if it’s possible to set the brightness value through a unity app on run time.

Thanks!

Unity Editor version: 2022.3.16f1
ML2 OS version:1.11.0
Unity SDK version:1.12.1
Host OS: Windows

Hey @GalLibba,

It depends on what you mean specifically in terms of ‘brightness’

The ML2 has Global Dimming and Segmented Dimming features that you can configure at runtime in a Unity application.

The above resources should be able to get you started on a desired solution!
Please let me know if you get it working!

Best,
Corey

Hey Corey,
Thanks for your replay. I’m aware of the dimming options. My problem is a bit different tough. I want to manually control the device’s brightness setting from uthenity app on run time.

Hi, I’ve got the same problem. Have you got a solution now?

Hey @QWonderKid ,

There is no way to control the brightness of the Magic Leap via SDK as it is protected by system level permissions.

The only way to control the visibility of an object in an app is through the Segmented and Global dimming options provided in the SDK.

You could try using the default Android ADB command, but it may not have any effect on the Magic Leap as it is untested.

The command should be
adb shell settings put system screen_brightness (value)

where ‘(value)’ is a number between 0 and 255.

Again, this is untested so it may not work at all and requires USB debugging is enabled on the device.

Best,
Corey

Thanks for the advice, it works for me :slight_smile:

1 Like