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
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
5 People are following this question.
What is GetMaingameViewTargetSize()?
GPU profiling is not supported on GTX 970?
Reading Profiler Results
How do I profile a C DSP plugin function called from OnAudioFilterRead?