After 3-5 seconds overhead spikes and keeps taking up +60% of performance


As you can see in the image, the overhead suddenly explodes and keeps taking up +60% of performance. This happens after 3-5 seconds in the game, even if i disable my spawn scripts…

Plzz help?

Overhead usually indicates the usage of CPU required to keep your scene up and running smoothly whilst running the rest of your code.

Try closing the scene view whilt you Run / Profile and see if you still have the same issues.
If you don’t, that’s good for you, because after making a build you won’t notice the Overhead performance decreasal.

Now, this amount of Overhead can be lowered by not looking at your entire level from afar in the scene, I take it that little area you have there is full of polygons and triangles.
If you want to work in the scene, it’s worth zooming in a bit to avoid poly-overload, or turning the camera away.

Here’s a relative post to help you out a bit more.

In case closing the scene view doesn’t help out as much, show me some of the code to see how clean it is :3

I hope that helps, feel free to ask further questions, may this already be satisfying enough, please accept the answer and go onwards with your programming journeys :slight_smile:

This is a weird one that might not work for every one, but if you’re running a browser with flashplayer in the background, that can cause overhead spikes in Unity. I had regular spikes of about 10-12 ms in the profiler. Went down from ~90 fps to about 40 something. After closing all my browsers and restarting Unity, I now have a steady ~90fps. (This is all in an empty scene)