- Home /
Where am I calling OnGUI()?!?!?!
I am working on a rather large project that includes dozens of plugins and I believe that I commented out all calls to OnGUI (and OnInspectorGUI, OnSceneGUI, etc.). Unfortunately the profiler still says that I am making two calls to it per frame. Is there any way that I can use the profiler (or any other means) to figure out where these calls are coming from? I have attached screenshots below of my profiler.
Perhaps related, what is Placeholder.OnGUI() which I also have two calls to? I do not have any scripts or other assets in my project called Placeholder.
Thank you this has been wrecking my head for awhile.
To search the scrips in case you use VS you can use the solution explorer search and it will point all classes that contain onGUI() function, as for the plugins you need to have the source code to make that search. Anyway i don't think there is a way to find the source of the calls from the build in profiler. Lastly did you try to build the project and check the profile on the standalone? If the GUI calls don't appear there, there is no actual reason to remove them... Cheers
Your answer
Follow this Question
Related Questions
Profiler mystery with Physics2d 0 Answers
Make Profiler ignore a particular function? 0 Answers
Different render stats in profiler between Unity Editor and distant Android device 0 Answers
How to investigate spikes in total object count and meshes observed in the profiler? 0 Answers
Memory leak but only in the executable 2 Answers