Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: ishti10 on February 17, 2014, 04:09:29 AM

Title: Bug: Label hides behind sprite with explicit Render Q
Post by: ishti10 on February 17, 2014, 04:09:29 AM
Create a panel
Create a child white box sprite
Create a child label with colored text
Set panels Render Q to explicit
Label can not be seen anymore
Depth order of children widgets doesn't seem to matter
I believe it is a bug

Only workaround is to put a panel on label and set explicit render Q to +1. This is not a good workaround.
Title: Re: Bug: Label hides behind sprite with explicit Render Q
Post by: ArenMook on February 17, 2014, 11:47:46 AM
This is how Explicit render queue works. When you set it to explicit, all draw calls generated by the panel will have their render queue explicitly set to the value of your choice.

This mimics the behaviour of NGUI 2 where you had to adjust transform's Z position in order to determine what's in front of what.
Title: Re: Bug: Label hides behind sprite with explicit Render Q
Post by: coeing on May 05, 2014, 11:06:52 AM
I use the "Explicit" Render Q setting to set the sorting order as this field doesn't show up in the other settings. I need to set the sorting order to do the sorting between NGUI and some other addons we use (e.g. Spine, mesh texts,...).

As reported the labels are rendered behind my sprites then. As a workaround I set the sorting order while having "Explicit" selected and than switch back to "StartAt" or "Automatic". This way I get the correct sorting order and render queue as well.

So my question: Why is the sorting order field hidden in the other render queue settings except "Explicit"? What was the reason for this decision?
Title: Re: Bug: Label hides behind sprite with explicit Render Q
Post by: ArenMook on May 05, 2014, 11:32:38 PM
I'll just expose it in the next update so you won't need to use the work-around anymore. You can do the same thing locally by commenting out line 554 of UIPanelInspector.cs.
Title: Re: Bug: Label hides behind sprite with explicit Render Q
Post by: coeing on May 12, 2014, 12:08:36 PM
Great, thanks!