I have a situation where Time.deltaTime and Time.time do not correctly update between Update() calls.
At one point, I am loading a lot of game objects, something which takes about 2 seconds, during which the game basically freezes. This is ok - I will optimize this later. When I log the updated time between the last frame before the freeze and the first frame after the freeze, I get:
2014-01-29 11:30:14.3543 We increase time by Time.deltaTime 0.01639664 to Time.time 11.4154
// 2 second freeze here
[info] 2014-01-29 11:30:16.6814 We increase time by Time.deltaTime 0.3333333 to Time.time 11.74873
If I log the time using DateTime.Now(), I get the correct difference: about 2 seconds. (from 11:30:14 to 11:30:16). But Time.time is only increased by 0.3333.
What’s going on? Is the time lost by instantiation of new objects not included in the deltaTime? Or maybe the Physics calculations? There are physics included in the newly spawned objects.