Search Unity

[Solved-ish] SplitView.SplitGUI() huge spike every few seconds while playing

Discussion in 'Scripting' started by joshcamas, Jun 18, 2019.

  1. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    Hello friends!
    I'm having an issue where every few seconds, (10 or so) my editor has a huge lag spike. This only happens during the game.

    Here's the profiling during deep profile. Note the high GC.Collect as well:


    I'm not sure what DockArea is. My only guess is it is where window tabs sit?

    Anyone know how I can fix this? It's quite frustrating, since it makes playing the game in the editor very annoying.
     
  2. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    I managed to figure it out. I decided to disable gizmos on a certain object (Astar pathfinding project) and the issue went away.
    In other words, this was caused by gizmos being too thicc during gameplay. What I don't get is why this issue was actually shown in the profiler, not "SplitGUI()". I'm lucky I managed to find it.