I’m trying to remove all my performance hiccups in my game right now so I’ve started my 30 day trial of Unity pro and am using the profiler. The results I’ve gotten have helped me get my average frame rate up by a huge amount, pointing me in the direction of some naughty things I’ve forgot that I did in code. However the ‘hiccups’ are entirely still there and the results I’m getting don’t make sense to me.
I can only upload two images for this question, but here are some imgur links if you want to see each of the non-repeating hiccups:
I also made a video, but I’m not sure how useful that will be.
Just by scrubbing through in the profiler, I see on most frames both my CPU and GPU times are below 4ms put together, but once in a while I spike at about 100-200ms on some random function I’m not calling. I’ve played through dozens of times and I get seemingly random internal unity calls popping up at about the same pace (about once per second).
For instance: I have zero cloth simulation in my game and Physics.UpdateSkinnedCloth pops up sometimes?
Any ideas on what this could be or what I can do? I can post code for you guys but I’m not sure how much help it will be since nothing is pointing directly to an area of code.
I’ve made my repo public in case looking at source helps:
Some of the bigger scripts that are running on update or fixed update include:
Assets/First Person Drifter Controller/Scripts/FirstPersonDrifter.cs
The main scene in the root of assets is pretty plain.