Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

ARFoundation - Prevent mobile screen switching off or going to sleep

Discussion in 'AR' started by newguy123, Nov 12, 2018.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195
    Hi Guys

    When I'm running the AR App and detecting planes/surfaces, if I don't tap and place my prefab onto the plane within few seconds, the device goes to sleep (switches of the screen). How can I prevent this or increase the sleep time from the app???
     
  2. tdmowrer

    tdmowrer

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    605
    See https://docs.unity3d.com/ScriptReference/Screen-sleepTimeout.html
     
    newguy123 and jaugustin like this.
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,195