Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Managing time and frame rate

Understand how Unity measures time so you can manage the rate at which time passes in your application and ensure values update according to the appropriate time scale.
Read time 1 minuteLast updated 12 days ago

It's important to understand how Unity handles time to ensure your gameplay remains stable. Updates occur at regular time intervals to capture changes to character positions, health status, scores, and so on. If your code makes changes in the wrong update loop or doesn't allow for variations in time, effects like movement might be too fast, too slow, or jumpy instead of smooth.
The
Time
class contains properties through which you can get and in some cases set various time-related measurements and settings. Refer to Time in the Scripting API reference for a complete list of the properties and their meanings.

Topic

Description

Per-frame updatesUpdates which happen once per frame and whose frequency therefore depends on frame rate.
Fixed updatesUpdates which happen at a configurable fixed time interval.
In-game time and real timeThe configurable relationship between in-game time and real time and the potential effects.
Handling variation in timeTechniques Unity uses to compensate for variations in time and frame rate and to limit the effects of one-time delays.
Capture frame rateCompensating for frame rate when recording video of gameplay.
Simulate hitches for testingSimulate hitches to test how your game handles time variation caused by performance issues.

Additional resources