iPhoneSettings.screenCanDarken Manual     Reference     Scripting  
Scripting > Runtime Classes > iPhoneSettings
iPhoneSettings.screenCanDarken

static var screenCanDarken : bool

Description

Allows device to fall into "sleep" state with screen being dim if no touches occurred. Default value is true.

It could be useful to set screenCanDarken to false for games which uses accelerometer as a main source of input from user. However such games should allow screen dimming while in menu or paused for better battery life.

// Disable screen dimming
iPhoneSettings.screenCanDarken = false;