Screen.sleepTimeout 睡眠超时

static var sleepTimeout : float


A power saving setting, allowing the screen to dim some time after the

last active user interaction. Most useful for handheld devices, allowing OS to preserve battery life in most efficient ways.


sleepTimeout is measured in seconds, zero meaning never sleep. The default value varies from platform to platform, generally being non-zero on mobile devices.


On mobile devices it would be useful to set sleepTimeout to zero for games using accelerometer as the main source of input. However, such games should allow screen dimming while in menu or paused.


// Disable screen dimming
Screen.sleepTimeout = 0.0f;
Page last updated: 2011-9-18