Created
January 14, 2025 00:42
-
-
Save AldeRoberge/04de6968fa6ffd2738342ee693886cff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Wikwemot_AR.Modules.UI.Runtime.Scripts | |
{ | |
public class DisableScreenTimeout : MonoBehaviour | |
{ | |
private void Start() | |
{ | |
DisableScreenSleep(); | |
} | |
private void DisableScreenSleep() | |
{ | |
Screen.sleepTimeout = SleepTimeout.NeverSleep; | |
} | |
private void EnableScreenSleep() | |
{ | |
Screen.sleepTimeout = SleepTimeout.SystemSetting; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment