The Unity Editor is running at over 3,000 frames-per-second, preventing me from testing my game...how do I fix it?

Last night, the Unity editor suddenly started to run at 3,000 FPS. It was amusing at first, but it’s become problematic because I can’t test my game with everything moving at super-fast speed.

If I export my game to a tablet or phone, the FPS is normal, but within the Unity editor, the game is moving at ridiculous speeds.

This has happened before. Whenever this happened in the past, I was able to get it back to normal speed by simply closing and re-opening Unity. However, that isn’t working this time. I’ve even reset my PC, and I’m still getting super-speed in the Editor.

Can anyone tell me how to get Unity back to normal?

3 Answers

3

If anyone else has the same issue as the OP, I suggest you use Time.deltaTime to move your objects around. Your game shouldn’t run more quickly at a higher frame rate, it should just be smoother if you’ve done everything right.

Changed correct answer as this answer is the better way to solve the problem. Its far better practice to make your game frame rate independent then to rely on hardware dependent solutions, such as VSync

Maybe un-install and re-install? have you also messed around with Time.timeScale? I know that could do it if it was not properly used?

I have the solution.

I went to Edit > Project Settings > Quality and noticed that “VSync Count” was set to “Don’t Sync”.

I changed “VSync Count” to “Every VBlank”. and now the game runs at the FPS that it was originally running at.

I'd like to remind you that you are now relying on a devices peformance for your entire gameplay. If you'd play this game on Android the game would probably go extremely fast again(iOS limit ~30 FPS, android ~60) An easy to for this is to add * Time.deltaTime; This will take the time since last frame * your speed amount. So the speed is always the same, no matter the FPS of your game. See: [http://docs.unity3d.com/ScriptReference/Time-deltaTime.html][1] [1]: http://docs.unity3d.com/ScriptReference/Time-deltaTime.html