NOTE I’m not using any GUI stuff, In my 10 years of Unity I’ve never used it, Always have done the HUD myself.
But I’m looking at the profiler I see GUI.Repaint is getting called with 0.5% CPU cost and a 368B GC allocation each frame. A bit annoying, sure its not much but its all for something that I’m not using.
I assume its a 3rd party thing I have thats calling it, how can I track this down easily. I’ve done a search for all the OnGUI() and removed those, what else can I try? Like I said I’ve never used GUI so have no idea about it.
If you are profiling the editor, it‘s probably the editor doing that. Otherwise I‘m guessing the engine still may have reason to call this, especially if this is a dev build which may pop up the console to show error logs.
OK thanks, I did manage to track it down, it was some 3rd party code.
It was just a bit time consuming trying to track it down, my project is > 5 years thus theres a lot of junk there which could be removed.
I have done the occasional clean-up in the past, which a couple of times that lead to strife as it would break something that I didn’t realize until a month or so later. gah Now I’m in the project’s final stages thus rechecking/cleaning/optimizing etc
It would be nice if there was a way unity could tell me exactly whats causing X to happen.