My project runs too fast in Unity Editor. How can i fix this?

Hello,

Before i upgrade Unity 4.5 to 4.6, my project was running with normal speed in unity editor. But after the upgrade, project started to run too fast in editor. It runs with normal speed in android device. How can i fix the speed of unity editor?

Thank you!

It sounds like your scripts are frame rate dependent. The higher the frame rate the faster things move. You should be using Time.delaTime in your scripts when moving objects etc. Either that or you have changed the game speed multiplier in the editor. It’s hard to say without more details.

This thing came up after i updated unity. It is really interesting. I think it is not about using Time.deltaTime because if it did about that, some of things would run with normal speed and some of things would run faster, and game would run fast in android device either, am i right? It seems like there is a problem with the editor. Game speed multiplier can be connected with it. How can i fix it?

Its unlikely that you would only do it in the editor but check if you set this value:

What exactly is running fast? animations, physics ?

I checked it but it is not about timeScale. Everything is running fast for instance, sounds, animations, physics…

That does sound strange. Can you share the project?

I would like to share it but it’s really huge project. Maybe it may take a week for me to upload it and share. Now i am downloading previous versions of unity to see if project is working with normal speed.

I installed 4.6.5 version of unity but the problem still occurs. Like i said before, it is only fast in Unity editor, it does run with normal speed in Android device.

That happened to me once. It was really weird, and i thought i was imagining things or having psychotic episode or something :slight_smile: Unfortunately i cant remember what fixed it, but if it did happened to me now, i would first try to reimport everything, then check entire project if there was any timescale code, then try different timescales in any script where timescale was used. While its only happening in editor, perhaps there is corrupted meta or cache file or something? Backup your project, and try if deleting folder library/metadata helps.

I think it is most likely about not using Time.deltaTime (properly). The idea behind using Time.deltaTime is to make the movement independent of the actual frame rate. With Android, you usually have lower frame rates and if you don’t make your scripts frame rate independent, the movement on slower devices will be slower.
I suggest that you show your movement script and please don’t forget to use code tags:
http://forum.unity3d.com/threads/using-code-tags-properly.143875/

1 Like

@Dantus If it was time.deltatime problem, it shouldnt affect sounds, animation, etc. Sounds more like timescale issue, or some weird bug.

@bekiryanik create a duplicate of the project, chop out as much as you can to reduce file size whilst keeping the issue and upload it so we can take a look.

@chelnok and @Dantus thank you for your answers. I will work on timescale. I have find out something about this issue today. If i use small editor screen, the project run with normal speed. If i use larger editor screen, the project run too fast. :slight_smile: This thing may take us to the solution. What do you think about this one?

@karl_jones i will try to do that but i think it’s going to take a while.

Thanks you so much for interesting!

Sounds to me you have vsync off now but it was on before.

…and yes, you really should be multiplying any movement or changing variables over time with Time.deltaTime, which will eliminate these issues regardless of vsync.

2 Likes

@hippocoder Bingo! Now everything works fine, thank you so much. I’ve closed vsync for a long time ago and i forget that i closed it. Now, the problem is solved. :slight_smile:

I know this is a pretty old post but…I stumbled across this because my game was flying way too fast in the editor…found out it was because my monitor was on 144hz refresh rate…changed it to 60 and it’s fine

I have also been having problemes my game speed. I have consitenly been multiplying any mouvment by Time.deltatime. But when the v-sync is off the game goes too fast and if the frame rate goes down the speed of the game slows down. My Time.deltatime value is just not working correctly. My alternetif is to use unscaledDeltatime and multiply it with time scale since in my game their is variances of Time scale but it feels like a work around instead of a fix of the problem. I would like to understand at least why Time.deltatime doesn’t work like what i would imagine.

Uppon further testing I have realised that the v-sync mode affects the game speed and the Time.deltatime is not propaly changed but if in the ProjectSettings>time>maximumAllowedTimeStep the value is too small that limits the value of Time.deltatime. So that can also be a probleme causing your game to be slow when it shouldent.