- Home /
Resolving a "stutter" in framerate during play
I am working on a distance game and I have most everything built out so that it behaves as I want it to. However, every so often while I do test plays in the editor, everything seems to "jerk" for a minute - the entire scene, like the framerate stalls or stutters. I have checked:
Animation
Physics
and not found a direct issue there. I am using a character controller and .Move for movement, and placed things into the proper Update/LateUpdate/Etc order. The stutter can happen at almost any time, too, even when there's very little currently on the screen. The one thing I "HAVE" noticed, is that the batched items tends to jump up when the stutter occurs. Has anyone encountered an issue like this before?
are you using the profiler? or have the profiler window open? if so close it, Is this just in editor?
Yes, I am using the profiler and I've noticed that when the stutter occurs, everything spikes for a half-second. The framerate stutter occurs with and without it. Interesting, in web player build at least, the stutter is far less pronounced and almost gone.
Okay, after checking a few builds, the stutter is gone from both the web player and the PC .exe build.
Yeah, performance isn't great in the editor sometimes. Also, I had this issue recently with iOS. Everything was fine on $$anonymous$$ac, because of the processor speeds but on iOS I had a half second, game ruining pause every now and then... the culprit? Dynamic fonts!
Is there any suggested method to resolve this in the editor at all, or is it time to start testing builds when it gets this way?
Answer by unimechanic · Feb 25, 2014 at 01:15 AM
IF you are able to reproduce this consistently in a project, please submit a bug report with the minimal project (if possible, will be very helpful) that reproduces this problem, following these guidelines and additional information:
http://unity3d.com/BugReportingFAQ
http://blogs.unity3d.com/2013/10/28/bug-reports-incidents-and-some-bashing/
http://issuetracker-staging.unity3d.com/
The bug reporting tool is next to the Unity executable if you can't run it from the editor. Our QA team will review the issue as soon as possible, and then assign it to our developers. Having the bug report is the only way this problem can be fixed.
Answer by prawn-star · Dec 03, 2014 at 08:58 AM
I too spent a few days trying to track down why my IOS level would stutter a little the start. And only the first few times the level was loaded. The culprit was indeed my score increment and being updated on screen. My solution was to duplicate the score object and set it to "0123456789" and make sure the game camera could see it when the level loaded. I would then hide this game object in Start(). I guess having the mesh's 0-9 in memory stopped the need for the game to create them when my score was updated and therefore stopped the initial stuttering of the game.
Yeah, that's because you were using dynamic fonts. I stopped using them for that reason. If you have the font size set too high, it's a real performance killer.
Your answer
Follow this Question
Related Questions
Root motion in child not moving with parent 2 Answers
Best Way to make a character move 1 Answer
Jump not framerate independent 3 Answers
Vector 3 - move on only one axis 0 Answers
Physics for Moving Objects 0 Answers