- Home /
Screen brightness on Android
Hi,
How can I control screen brightness on Android via Unity script?
For example: I want to darken the screen when no input was given for a certain time but I don't want it to go to pitch black.
Answer by sumeetkhobare · Apr 29, 2014 at 02:56 PM
Check out
RenderSettings.ambientLight
You can programmatically set it with dark colors when idle, and bright colors when you are not.
Answer by Riskjockey · Mar 27, 2019 at 08:20 AM
You can control Android (and iOS) screen brightness using Dimmer: https://assetstore.unity.com/packages/tools/integration/dimmer-141555
One of our apps needed to brighten up the screen when it needed attention after sitting idle for a while, and I figured I wasn't the only one who could use this functionality so I built Dimmer. You can use it to darken the screen too, of course. And it doesn't require any extra permissions.
Hope you find it useful.