Search Unity

Simple game is extremely lagging

Discussion in 'Scripting' started by Rotzak, Aug 13, 2018.

  1. MeadowGames

    MeadowGames

    Joined:
    Dec 15, 2013
    Posts:
    11
    Don't mean to revive an old thread but I had the same problem and thought I'd shed some light on how I fixed it. My project is running Unity 2018.4.26f1. After upgrading from Unity 5.4 which was completely stable stupid stupid decision I noticed the same exact jitter glitch delay and spike in the profiler. After hours and days searching the forums the internet I found the answer by simply opening the package manager and removing the "Unity Ads" from my project. I systematically removed and reloaded dozens of assets with the problem persisting but after stumbling on "Unity ADS" and deleting the stutter was gone.
     
  2. MeadowGames

    MeadowGames

    Joined:
    Dec 15, 2013
    Posts:
    11
    upload_2020-10-3_19-0-45.png
    I spoke to soon. I still have the CPU spike after removing Unity Ads but the interval has decreased drastically since. Every 30sec - 1 min. I get this werid jump. Its playable but physiologically unacceptable.
     
  3. usninja

    usninja

    Joined:
    Jan 29, 2017
    Posts:
    3
    Well? is there any solution for this jittering in 2021, i have the same issue on a simple 2d project, i use pools and i instantiate at start, then reuse, that doesn't seem to be the problem
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Of course, but jittering can be caused by a wide variety of things. The OP doesn't appear to have used the Profiler against a build on the target device, so it is hard to speculate if there was some performance issue popping up there. But that's usually a good place to start. Also look at your object movement and camera movement code. A common source of jitter for example, is moving the camera before moving objects the camera is supposed to follow..
     
  5. andreydoku

    andreydoku

    Joined:
    Nov 7, 2020
    Posts:
    1
    That fixed my issue. Ty so much :)