- Home /
GUI.DrawTexture Slow in Editor
I am drawing a texture using GUI.DrawTexture in an OnGUI Editor method. The texture is drawn in different positions based on certain variables that are changed by the user. The time it takes for the texture to redraw is very slow. It is inconsistent and would take from 0.1 to 0.5 seconds to update.
All of the other code changes instantly, but the DrawTexture lags behind. How can I make DrawTexture more responsive? Is there a better solution to display textures in an Editor Window?
Please post your code, so we can check whether something else might impact performance.
Answer by ShirleyXiao · Apr 26, 2012 at 05:36 PM
All I know is that OnGUI function requires more memory, so it's more slow to use. I suggest that you use some plugin for 2D object so it will be more fast. Some of plugin that you can use : NGUI, 2DToolKit, SpriteManager, etc.
Your answer
![](https://koobas.hobune.stream/wayback/20220613070756im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Draw texture in editor with size less than a single unit 2 Answers
strange results with GUI.DrawTexture() in the editor scene 1 Answer
How to build an editor window with a treeview widget? 4 Answers
How can I fix my blurry editor? 0 Answers
Is there a define for "code is running in the editor"? 3 Answers