Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity? wazzup, Our game is stuttering! i thought your software is good.

Discussion in 'Editor & General Support' started by eanjo7, Jun 21, 2014.

  1. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    958
    If your maximum timestep is affecting framerate stability this much, it sounds like you have a physics related bottleneck. Refer to the documentation for an in-depth explanation of what it does.
     
    Last edited: Jul 2, 2014
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    (which is what the profiler screen shot said)
     
  3. prawn-star

    prawn-star

    Joined:
    Nov 21, 2012
    Posts:
    63
    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 turned out to be TextMesh object
    The player score is displayed above the player and updated with a score.ToString(). It seems that a new mesh needs to be created to do this. And this creation was causing the initial stutter
    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.
     
  4. Epictickle

    Epictickle

    Joined:
    Aug 12, 2012
    Posts:
    431
    Just a thought.... Are you using Mobile-Friendly shaders? If not, it can REALLY kill performance over time.

    BUT, your profiler is pointing toward physics. Are there any infinite loops? Are you calling to a rigidbody a lot in FixedUpdate? Keep your physics calls to a bare minimum... At what point in your game do the hiccups seem to be the worst? Do they seem to be the worst when you're doing a physics-intensive activity like jumping or running? Do they seem to decrease if you stop moving the player at all? If you take everything that uses physics out of the scene, except for the player, and run the game, do you get the hiccups?
     
  5. Bionicle_fanatic

    Bionicle_fanatic

    Joined:
    Jun 8, 2013
    Posts:
    368
    One question: Do you have the latest version of Unity? Because if you don't, then it's highly likely that you're experiencing a glitch that older versions of Unity had with their physics compilation: Works fine in the editor, but build it and it goes haywire. So, if you haven't already, upgrade to the latest version and it should be all smoothed out [;)]