Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Vicas on August 28, 2014, 03:01:33 AM

Title: UIRect.Update() does a draw call per UILabel. Is that correct?
Post by: Vicas on August 28, 2014, 03:01:33 AM
Hello.

I am having trouble understanding the basics of Unity and draw call knowledge. At first I basically made one UIPanel every time I put a new UILabel some where. Then I saw in the Profiler that this caused one draw call per UILabel. Stupid I thought, and then went on to batch most of my UILabels into the same UIPanel as I would imagine was really as intended.

That worked fine and I got my ~117 draw calls from UIPanel down to ~10. But now all my UIPanels are doing the 117 draw calls from UIRect.Update()! Is this working as intended?

(http://new.tinygrab.com/e53ab9b91e3d28ff67b5c97da21d520504a8735453.png)

Is there a way to batch this like I did UIPanel?

Regards,
Title: Re: UIRect.Update() does a draw call per UILabel. Is that correct?
Post by: Nicki on August 28, 2014, 04:01:32 PM
You are confusing Draw Call with Method Call, the latter is the one referenced there. UILabels are batched as normal per material per panel like all other widgets.