DrawTextureWithTexCoords >> Batching?

Well…

We do know the theory of 3D assets batching together if using the same material (with low vtx count)…

But what about the DrawTextureWithTexCoords using the same textures to build the interface? Does it batch together?
Does the Unity 4.1 does handle such thing? Or did they ever think about it?

For now everybody have to use third party plugins to reduce draw call from the interface since the Unity’s GUI class is a little bit weird for it…

Any feedback concerning GUI.DrawTextureWithTexCoords?

Thanks :slight_smile:

Unfortunately - NO.

GUI.DrawTextureWithTexCoords is a part of UnityGUI which doesn’t batch (although it would be logical since having the ability to pick coordinates reminds of a texture atlas).

They did, they already introduced a new GUI system last year, but any concrete release date and feature list is unknown. One thing that is known is it’s being developed by NGUI author, so people say you might expect a certain similarities (that would probably mean it will differ from the one shown last year).

UnityGUI is not a low-draw-call-centric GUI system like NGUI or EZGUI, and it suits a different purpose. You could do a pretty complex things with it (nesting components within each other etc.)

Anyway, a single-draw-call GUI concept, which could be accomplished by using a single texture atlas, breaks apart the moment you do something more complex that requires graphics from another atlas. The number of draw calls depends of a number of switching between atlases, so: 2 atlases != 2 draw calls.

You should really use one of the GUI frameworks from the asset store that suits your needs (UT won’t be able to cover all the GUI genres with their upcoming GUI system).

Editor Extensions/GUI
Scripting/GUI