Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Kichang Kim on August 15, 2012, 11:14:48 AM

Title: Label disappeared when I rotate the scene
Post by: Kichang Kim on August 15, 2012, 11:14:48 AM
Hi, I'm newbie for NGUI.

I have a something problem about my GUI. When I rotate the panel, my button text was disappeared. This occurred in both edit scene and real game scene. Because of that, I can't use cool 3D GUI.

I'm using 2 atlas (one is design atlas, another is eastern font packed atlas).

How to fix this problem?
Title: Re: Label disappeared when I rotate the scene
Post by: ArenMook on August 15, 2012, 11:41:38 AM
This is explained in the FAQ:

http://www.tasharen.com/forum/index.php?topic=6.msg238#msg238

Different atlases = different draw calls.

Different draw calls = it's up to Unity to determine what's drawn in front of what. When you turn your UI, the center of the widgets changes, and some become farther away than others, so the draw order changes.
Title: Re: Label disappeared when I rotate the scene
Post by: Kichang Kim on August 15, 2012, 08:05:34 PM
Ah, I did not checked FAQ. sorry :)
Thanks for reply.
Title: Re: Label disappeared when I rotate the scene
Post by: Kichang Kim on August 15, 2012, 08:27:05 PM
This is explained in the FAQ:

http://www.tasharen.com/forum/index.php?topic=6.msg238#msg238

Different atlases = different draw calls.

Different draw calls = it's up to Unity to determine what's drawn in front of what. When you turn your UI, the center of the widgets changes, and some become farther away than others, so the draw order changes.

But I don't know still how to determine draw order of atlas. I set all of z of label to smaller than other widget, but it didn't work for me.
Title: Re: Label disappeared when I rotate the scene
Post by: ArenMook on August 15, 2012, 08:34:41 PM
With 3D UI -- you can't. You have to use one atlas for that, or the order breaks. You can sort of work around it by choosing the Overlay shader for your text, but it will look weird if you ever have text covered with another part of the UI.
Title: Re: Label disappeared when I rotate the scene
Post by: Kichang Kim on August 15, 2012, 08:49:40 PM
Oh, I see. I'll try to merge my font and design atlas. Thanks for quick reply!