Extremely Low FPS in Editor, smooth in Build. how to fix?
Hello guys, i'm having an annoying problem here. i'm still early in development, and i've just made a simple controller with custom physics using raycasts to know the height of the character, distance from a wall, etc. I don't know exactly when, but my game started to get very slow in the Editor Test mode, i'm not Debugging anything. If i create a build and play it, the game plays smoothly, no hiccups or fps drops. So, everytime i want to test my game, i'm using Build & Run, but that takes some time... I've read that in the editor, the game does suffer a little from FPS drops, but in my case, its unplayable. Can someone help me? Thanks in advance!
Have you checked the console window? Excessive logging can slow things down quite a bit. Even if you're not directly calling Debug.Log()
, you could have a plugin that is, or you could be running some code that throws exceptions constantly.
Common issues that can make this occur include excessive logging, extensive inspector or scene UI's, gizmos, or many viewports.
Additionally, I recommend using the Profiler to profile the editor. Yes, the profiler does indeed profile the unity application itself, and will tell you a bit more about what is causing the problem.
Whenever I have had this happen, it was because I had an object selected in the scene view with the Inspector open with a script on it that was changing a public list or array variable every frame in Update.
Well, I started optimizing my game, and after a few tweaks, i've made the slow downs in the editor less apparent, and the game is now better optimized in general, thanks guys!
Answer by MagicStyle · Nov 02, 2017 at 11:39 AM
I had the same problem. I opend up the Profiler (Window -> Profiler) and selected "Profile Editor", then I noticed a very high load, especially "UpdateSceneIfNeeded" was using extremly much CPU (Total 99%). But as soon as I hit "Profile Editor" everything worked perfectly fine again, as if Unity noticed me opening the Profile Editor and then stopped doing crap. I think the little minions inside my computer just needed a break or were protesting.
Answer by Commander Quackers · Dec 12, 2013 at 03:10 PM
Weird, it's the opposite for me usually - laggy in build and smooth in editor. But what you can do in the editor is go to quality settings and reduce the quality level at the top to fit your needs.
Answer by IgorAherne · Nov 24, 2017 at 10:26 AM
Same, getting massive spikes, 3 frames per second in Editor, UpdateSceneIfNeeded Well, are you happy now? You've updated everything you needed!