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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Pausing game with a timer

Discussion in 'Scripting' started by MathewHI, Jul 26, 2022.

  1. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Is it possible to use Time.timescale to pause the game but still have a timer? I need to do a Continue screen when the game ends that counts down from 10. Setting Time.timeScale to 0 is stopping the continue timer.
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    6,015
    You can use Time.unscaledDeltaTime which isn't affected by time scale. Worth taking a look at the docs.
     
  3. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Thank you.