Skip to content

Time Manager

Luke Mirman edited this page Jul 16, 2022 · 2 revisions

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.

Methods

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)

Properties

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