I’m experiencing a severe delay in time when Unity seems to be loading. I’m working on a project that involves many sprites and a custom frame-rate updater. Our custom updater uses the Time.time to figure out how many frames has passed (if any) since the last Update.
Our own clock seems stable, however, under heavy load I’ve noticed the timeline in Slate be delayed with as much as 20 seconds! – and thus completely offseting our timing.
Can you tell me how you handle when the application appears unresponsive or a lot of loading is going on? Do you automatically pause the timeline internally during load or what do you do? I’ve looked at the source, and can only see you’re using Time.realtimeSinceStartup, which I guess shouldn’t cause this kind of problem.
The cutscene is updated using deltaTime * the cutscene playbackSpeed. You can check this piece of code in Cutscene.cs and the method name “Internal_UpdateCutscene()”. The realtimeSinceStartup you saw in CutsceneEditor, is only used for the editor and not in game. 🙂
Using deltaTime really is the correct way of updating time based processes, since Time.time does not take into account the actual frame rate. As such, if there is a heavy load, using deltaTime you will still get to see what happens (even if choppy) and also all other time based processes will stay in sync with one another (since once again using deltaTime is the standard for such processes) 🙂
Thanks.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.