Author Topic: Label disappeared when I rotate the scene  (Read 3358 times)

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Label disappeared when I rotate the scene
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Label disappeared when I rotate the scene
« Reply #1 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.

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Label disappeared when I rotate the scene
« Reply #2 on: August 15, 2012, 08:05:34 PM »
Ah, I did not checked FAQ. sorry :)
Thanks for reply.

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Label disappeared when I rotate the scene
« Reply #3 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Label disappeared when I rotate the scene
« Reply #4 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.

Kichang Kim

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Label disappeared when I rotate the scene
« Reply #5 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!