How completly remove GUI.Repaint() calls ?

Hi !

The question seems obvious but it’s not. How to remove calls made by OnGUI, because of garbage collector spikes, and performances issue of Repaint() function.
(ex :

Is there a way to completly remove these calls ?

Of course, i already remove the only OnGUI() call on my scene but calls to Repaint() is still here. I read a rumor that i need to remove every OnGUI() calls of my whole project. Is that true ?

I was a hidden script which actually call OnGUI function. Removed, and problem gone.

Sorry !

Hi BenouKat,

I am not sure if this helps but here goes. I have also attached a pic showing an error and I don’t know why that’s happening and if I am supposed to do anything about it

Thanks & Regards,