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.

Question How do you pause the entire app?

Discussion in 'AR' started by swifter14, Dec 27, 2022.

  1. swifter14


    Mar 2, 2017
    I use this -
    if (timeSinceLastClick > 60)
    Time.timeScale = 0;
    But that doesn't freeze either the camera/ar tracking or audio. Besides the animation, everything else seems to keep running.
    I'd like to pause the app completely so the users can save their battery and avoid heating
  2. andyb-unity


    Unity Technologies

    Feb 10, 2022
    To pause Audio:
    AudioListener.pause = true

    Note that you can't pause an AR Session, per se, but you can disable it. From our docs:

    When you disable the AR Session component, the system no longer tracks features in its environment. Then if you enable it at a later time, the system attempts to recover and maintain previously-detected features.
    newguy123 likes this.