Reputation: 11
In Unity you can prevent the screensaver kicking in / inactivity timer from shutting the computer down by using the Screen.sleepTimeout setting:
Screen.sleepTimeout = SleepTimeout.NeverSleep;
However this only seems to work if the application is the active Window. If another Window is in the foreground, and my Unity application is in the background (but still visible), then the screensaver activates after the timeout period, even when this setting is set.
Is there another way to do this that will keep everything alive as long as the application is running, even when it is in the background?
[Behaviour described is seen on Windows - it may or may not be different on other platforms, but I'm looking for a cross-platform solution if such a thing exists, or just a Windows one if this is a peculiarity of Windows!]
Upvotes: 0
Views: 757