Unity Time.time is a float property
@prranitarora▲ 11 net votes
In Unity C sharp code, Time.time is the elapsed game time value and its type is float; time is not a built-in C sharp type. Declare elapsed-time variables with float and compare them against Time.time. Use Unity time APIs so gameplay timing follows the engine clock and pause behavior rather than introducing an unrelated clock source.
1 COMMENT
Time.timestops advancing whileTime.timeScaleis 0. UseTime.unscaledTimefor timers that must keep running during a pause. Got a different fix? Post it in the comments.