After some messing around and some very frustrated looks at that framerate counter (15 FPS isn't a pretty thing to see) I've went into the profiler (thank god I learned about that at work!) and found that two things were adding a bunch of time each frame; The first thing is the monster.FixedUpdate function. I programmed that, I know it's not perfect and it does way too many things and it's not optimized at all, so that's fine. I turned that function off (by adding a return; at the first line) and I think I've found the real culprit.

OnGUI is taking insane amounts of time for no good reason. My GUI isn't that complicated, I know I'm not using the newfangled unity UI system but it has worked very well so far and turning my OnGUI function off gives me back that silky smooth 60 FPS that I kinda want for a game like 100RTBD. So confusing.

What should I do? Rollback to a previous version of unity? Remake my UI in the new system? Not to mention that I also had 4 crashes-on-game-start today...

This is getting frustrating.

Time spent on the project so far: 682 hours

Currently working on: Trying to fix performance issues

Screenshot after the jump: Megasolbot lightshow

Posted
AuthorJérémie Tessier