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. Dismiss Notice

Pause for timedelta?

Discussion in 'Scripting' started by peacemaker109, Aug 15, 2014.

  1. peacemaker109

    peacemaker109

    Joined:
    Feb 8, 2013
    Posts:
    35
    Been doing alot of scripting on diffrent stuff, and alot of things tend to be dependant on using Time.deltatime to process there stuff, but now I am at a point I need a option to pause game time for some things, but when I just stop using the things that process the deltatime, the time still increases based on the amount of time the project is running if I am correct.
    So if i wanted to pause the game, say if player opens a window like inventory or main menu/options menu or something, how could i prevent deltatime or what not from updating so time in a sence stands still while there are in that area then resume afterwords?
     
  2. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    NomadKing likes this.
  3. zee_ola05

    zee_ola05

    Joined:
    Feb 2, 2014
    Posts:
    166
    @LightStriker
    unscaledDeltaTime? O_O Is this new? I wish I have known this before..
     
  4. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    It is... I think from 4.5, not sure the version that introduced it.