Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Game runs slowly in editor

Discussion in 'Editor & General Support' started by Brian-FJ, Sep 7, 2016.

  1. Brian-FJ

    Brian-FJ

    Joined:
    Apr 23, 2013
    Posts:
    9
    Hi, I'm having some strange behaviour in the editor, I was wondering does anyone have any pointers as to what to look into next. When I build a windows standalone client for our game everything works fine. However if I press Play in the editor then frequently I get long, slow frames. The stats window and profiler both say that performance should be what I see in the built client.

    Here are some of the things I've learned while investigating.
    1. If I make my character fly so he is not touching any collider then the problem goes away. In fact if he is standing on a floating box collider the problem goes away. I do have a lot of box colliders (about 4,000) so I did think too many contacts was the problem but I have placed all these colliders such that none touch each other and the problem remains.
    2. If I close every other editor window the problem remains so it is not just a case of the game being rendered a second time in the scene view.
    3. This happens to everyone on the team and reinstalling Unity has had no effect.
    4. I'll just describe what the slow down looks like. Most frames are normal, similar to the built client. However some frames take much longer even though the profiler shows no difference. These aren't at regular intervals or anything but they do seem to happen more often if I'm moving or looking around.

    If anyone has seen this behaviour before or knows where I may look further please let me know.

    Cheers, Brian :)
     
  2. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    Are you getting any reports of Gfx.WaitForPresent in the profiler? I've noticed when the profiler is running I'll get that call, which I believe has something to do with rendering the profiler window itself.
     
  3. Brian-FJ

    Brian-FJ

    Joined:
    Apr 23, 2013
    Posts:
    9
    I'm afraid I'm not SG. The profiler looks totally normal and says I have a nice 15ms frame while the game view is stalling :(