- Home /
Time Scale issue at high resolution (3000x2000)
I have been having a very strange issue with my project when building a standalone Windows build and running it on a Microsoft Surface Book.
My project is pretty basic right now with not much going on. I have the targetFrameRate set to 60 and the Surface Book has no problem hitting that target. What's strange is anything that uses Time.deltaTime is running slow as if my Time Scale was lower than 1.
I have checked all the values of TimeScale, DeltaTime, FixedDeltaTime and they are all as they should be. Even while the application is running. So they aren't being altered anywhere.
TimeScale = 1;
DeltaTime = .016;
FixedDeltaTime = .016;
But for some reason, when running it on my Surface Book at a resolution of 3000x2000, it runs as if my TimeScale was less than 1. Lowering the resolution of the player when it starts does not affect it. Although lowering the resolution of the entire screen in Windows does. If lowered through Windows, it runs at normal speeds.
The speed difference seems to fluctuate between runs. When I start it the first time, itll be maybe 25% slower, the next time maybe 50% slower. It's very strange.
Has anyone experienced this before? Any Ideas to test it further? Thanks for any help.
Edit: So I got the editor installed on my surface book and of course it runs flawlessly in the editor. Profiling a build just shows the gfx.WaitForPresent blowing my CPU away. This doesn't happen on any other windows machines so it must be some issue with the surface book graphics/cpu setup.
I managed to get it to run at normal speeds by setting the fullscreen mode to 'exclusive'. A decent workaround for now, I'd rather not have to force people to go fullscreen, but I can at least work with it for now.
It's a work in progress I guess.
$$anonymous$$aybe it is not a Time Scale issue but a frame rate issue? I don't think time scale is slowing down your project, what's probably happening is that your frame rate is slowing down when you display the game at that high 3000x2000 resolution. Are you doing anything that is rendering intensive? You should try profiling it.
Nothing is intensive, I can run it at 1000fps no problem if I let it. I agree it doesn't seem like it is literally my time scale changing. The value remains at 1 while im running.
Not sure how you have your code setup but make sure anything physics related is in the fixed update, and try using fixed delta time ins$$anonymous$$d of the regular delta time.
I am doing this. And it does fix anything that uses those items. But there are still issues, for example all my animations are slower, and anything that uses WaitForSeconds(). Using WaitForSecondsRealtime() makes it even worse.