Search Feedback

61
votes

Screen Brightness Control

Platforms

-

-

Hi everyone.

I have been trying to find a way to dim the screen on iOS for a while and can't find anything at all.

I can see how to stop the screen going to sleep, handy, but I can't seem to override the screen's brightness.

It appears possible in xcode, just no functions for it in Unity.
eg
https://developer.apple.com/documentation/uikit/uiscreen/1617830-brightness

This would be really handy for overriding the current setting to save energy for example, or to create some cool effects of pulsating the screen when some explosions happen etc.

Other uses might be when you are creating an app to use at night, you want to control the screen brightness from in the app so the user can use a slider or something.

Also apps that use a barcode to be scanned from your screen or QR code etc could benefit from this, eg dim the app lower when you are using the menu and finding the things in the app you need, then when you show your phone to be scanned by presenting the barcode on your screen, you can 'brighten' the screen so the scanner can pick it up better.

I really want this for basically setting it to minimum or very low but keep the app running so it can keep my players moving around the screen etc.
This will help save battery.
Right now I can only use SleepTimeout.NeverSleep or set a timeout value.

I would love to see a new option in Unity such as:
Screen.brightness = 0.4f
(float between 0 and 1)

Anybody else think this would be good have too, or in fact if you know of a function that does exits for this already I am missing?

Comments (1)

  1. 735dfbad8775b10cdb814cfc2891372c?d=mm

    marcotys

    Sep 21, 2018 00:03

    I am wondering if anything has been done about this.
    Similar to the original poster, I am trying to set the brightness of the iOS screen in Unity via a script.
    At the moment, this does not appear to be possible. I am therefore currently working on trying to make the application at least use the default system brightness instead of its current default which is to set the brightness to max on start-up.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10889)

2D

(287)

Ads

(57)

AI & Navigation

(81)

Analytics

(130)

Animation

(406)

Asset Store

(364)

Asset Store Publisher

(19)

Assets

(551)

Audio

(185)

Cloud Build

(148)

Collaborate

(68)

Docs & Tutorials

(247)

Editor

(2545)

Everyplay

(17)

Game Performance Reporting

(21)

General

(987)

Graphics

(894)

GUI

(442)

Input

(173)

Licensing

(93)

Networking

(190)

Physics

(387)

Platforms

(445)

Profiling & Optimization

(84)

Runtime

(185)

Scripting

(1141)

Terrain

(174)

WebGL

(142)