Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Editor Loop giving massive lag spikes (fyi I'm new to unity)

Discussion in 'Documentation' started by starwarsb2003, Oct 11, 2020.

  1. starwarsb2003

    starwarsb2003

    Joined:
    Sep 5, 2020
    Posts:
    8
    When I start my game my player is running around on a box collider. After running around for about 15 seconds he sorta just clips into the platform underneath and falls through the ground.


    Checking the profiler to see what caused the lag for this to happen, I noticed that my Editor Loop would spike to between 100-500ms as my character clipped into the ground.
    Spike.PNG


    Checking the profile editor I saw that a few things were causing this.
    Culprits.PNG

    This is the info prior to the spike:
    BeforeSpike.PNG

    This is after:
    AfterSpike.PNG


    All help will be greatly appreciated.
     
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,391
    Well, it's saying that the profiler window is really slow.

    If you're on Unity 2020 (or later), there's an option to run the profiler window as a stand-alone process. That'll help prevent it from interfering with the profiler results.

    In order to get the best profiling results, I recommend creating a build and profiling that.
     
  3. starwarsb2003

    starwarsb2003

    Joined:
    Sep 5, 2020
    Posts:
    8
    Thanks for the help, it worked!
    All I did was update unity to the latest version and run the profiler as stand-alone. :)
     
unityunity