Skip to content

Time Manager

Luke Mirman edited this page Sep 5, 2022 · 2 revisions

Time Manager Class

The TimeManager class gives functionality for modifying the Time.timeScale and support for Pausing/Unpausing it. By utilizing this class pausing will not lose the previous value of timeScale when resuming the game.

Static Methods

Method Description
Pause() Freeze the game simulation, setting time scale to 0.
Unpause() Resume the game simulation, setting time scale to the TimeScalar
SetScalar(float) Set the time scale for when the game is unpaused.
ClearScalar() Shorthand for SetScalar(1)

Static Properties

Property Description
IsPaused If the game simulation is currently paused.
TimeScale The current actual time scale that the TimeManager has set.
TimeScalar The desired timeScale while unpaused.

Clone this wiki locally