Game runs slowly in editor

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.

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

Cheers,
Brian :slight_smile:

I don’t have a specific answer, but you can diagnose the issue with some tools. Using each is an art so you may need to google and read about how to use them before getting value from them.

Hi, just writing to say how far I’ve gotten in my investigations. I found that if I combined the colliders in my scene so that there were fewer, larger colliders in the scene the slow down shrunk to a barely noticeable level. I ended up getting the number of objects down to less than a thousand. I’m guessing that I had too many objects in existence in the editor and that Unity couldn’t process them all within a frame’s time.

Thanks for all your help :slight_smile: