Author Topic: NGUI Drawing Issue?  (Read 1925 times)

BlueSin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 17
    • View Profile
NGUI Drawing Issue?
« on: January 08, 2016, 10:59:16 AM »
I really felt the best way to convey this was visually with a short video (18 seconds), you can find it here:  https://dl.dropboxusercontent.com/u/78881962/NGUIIssue.mp4

Essentially I have 2 buttons attached to each my horizontal & vertical scrollbars.  Left & Right arrow, Up and Down arrow, like you would have on any scrollbar.  The problem is that when my scene first loads...the Right arrow button and the Down arrow buttons are missing.  But if I pause and unpause, they mysteriously appear.

At first I thought...well maybe they are being drawn under my map, so then I disabled the map so that the interface was the only thing there and those buttons could not possibly be drawn under anything.  No go, even with the map disabled, those buttons are still missing until I pause and unpause.

I cannot make heads or tails of this issue, so any help is appreciated!


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Drawing Issue?
« Reply #1 on: January 09, 2016, 10:40:17 AM »
Check your anchor settings. My guess the widgets are anchored and are not set to update every update, and the editor's screen resize is not resulting in a proper update call. I'm guessing you wouldn't see this when building the app.

Either that or you have more than one widget per game object.

BlueSin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: NGUI Drawing Issue?
« Reply #2 on: January 10, 2016, 04:28:38 PM »
I checked the widgets, they are set to update as normal.  And they had only one widget.  I did manage to fix it however by delete the arrows that weren't working, duplicating the arrows that were working (in this case left and up) and positioning them appropriately.  I did that and everything worked just fine afterwards, not quite sure what was going on but it is fixed now!