- Home /
The question is answered, right answer was accepted
Too many DrawTexture calls
Im showing a set of images with GUI.DrawTexture. The numbers of images are 15. Even so, the DT calls are 40. In a certain time, the images are changed for another set. In that moment, the DT calls get up to 100 and the frame rate decrease to 5/6. I checked my code and that should not be happening... any idea??
EDIT: I changed DrawTexture to DrawTextureWithTexCoords. I cut in half draw calls. But still the peak to 84 draw calls and still causes the FPS to drop!
EDIT 2: The thing is that in the preview in Unity editor seemed to freeze a second (when the draw calls peaked to 84) but in the build everything shows fine, so is not a problem! (I think!)
You do know that OnGUI is called multiple times per frame?
But I find no reason to get that draw calls peak... do you?
Follow this Question
Related Questions
Lower Draw Calls For Sprites 2 Answers
Can I use GUI.DrawTexture/Graphics.DrawTexture with UGUI? 0 Answers
How many tris? 1 Answer
Graphics.DrawTexture in OnGUI() 1 Answer
Drawing Multiple Textures to the GUI during runtime 1 Answer