Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wangzy_88 on December 11, 2013, 10:00:15 PM

Title: Dynamic Font draw on Model
Post by: wangzy_88 on December 11, 2013, 10:00:15 PM
Dynamic Font Label and Sprite after Model,but Label draw on Model,no matter how I change z.
It's a bug?
Title: Re: Dynamic Font draw on Model
Post by: ArenMook on December 12, 2013, 12:23:56 AM
Everything in NGUI is drawn on render queue 3000 or higher, depending on the draw call index.

You can force a specific render queue by specifying it on the Panel.
Title: Re: Dynamic Font draw on Model
Post by: wangzy_88 on December 12, 2013, 01:00:02 AM
Thanks for reply,but when I change the RenderQueue,all UI elements will behind model.
At first,only dynamic font render not match it's z.
Title: Re: Dynamic Font draw on Model
Post by: ArenMook on December 12, 2013, 01:14:09 AM
I don't understand your last reply.

Render queue lets you control the draw order. Behind or in front, it all depends on the render queue.

Dynamic fonts are on a separate draw call (+1), which is why they are in front by default -- it's how the draw order is ensured.

If you want to mix UI elements with 3D objects in your game view, then I don't recommend you using non-atlased fonts. If you force the render queue to say, 3000, so that it mixes with your geometry, then you are going to have issues because your atlas geometry will be drawn with the same render queue as your text, and since the two are inherently in different draw calls, which one is going to be in front is completely arbitrary.
Title: Re: Dynamic Font draw on Model
Post by: wangzy_88 on December 12, 2013, 03:17:29 AM
I understand,thank you.