Author Topic: NGUI stray UI elements  (Read 3172 times)

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
NGUI stray UI elements
« on: August 23, 2013, 09:39:06 AM »
My team is having this strange issue where a panel is displayed, but when it is turned off, some of the UI elements that don't actually exist in the hierarchy stay in the scene. We found that they could be Force Deleted from the Game Object menu, but that doesn't help during runtime.

I've attached an image of the issue.

Any ideas on how to prevent this from happening?

Thanks,

-Jacob S.

---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI stray UI elements
« Reply #1 on: August 23, 2013, 11:00:25 AM »
Caused by not following upgrading instructions from the readme file.

Restart your Unity.

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: NGUI stray UI elements
« Reply #2 on: August 23, 2013, 11:14:04 AM »
I appreciate the quick feedback.

NGUI was properly imported, even still I just reimported it following the exact instructions.

When this glitch occurs, restarting Unity does resolve the issue, but only until I press Play again and the issue comes right back.
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI stray UI elements
« Reply #3 on: August 23, 2013, 12:40:07 PM »
What version of Unity and NGUI? How do you disable your panels? Did you change NGUI?

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: NGUI stray UI elements
« Reply #4 on: August 23, 2013, 02:11:20 PM »
Latest version of Unity 4.2, Pulling latest NGUI from bit repository. Haven't changed NGUI code. The objects are 6 radio connected check boxes, so upon pressing play all but one disable.
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI stray UI elements
« Reply #5 on: August 23, 2013, 02:16:22 PM »
Checkboxes don't disable. They may hide the checkmark, but they don't disable anything. What do checkboxes have to do with panels?

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: NGUI stray UI elements
« Reply #6 on: August 23, 2013, 02:30:01 PM »
I disable the panel that has the check boxes and re enable a different panel, for switching windows. But my point is, its the act of disabling the panel that causes the problem. Should I not be disabling the panel?
---------------------------
Jacob S.
Game Programmer
---------------------------

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI stray UI elements
« Reply #7 on: August 23, 2013, 02:52:21 PM »
The panel or the panel's game object? I don't ever see a reason to disable the panel component. I enable/disable panel game objects everywhere, including NGUI's menu examples and everything works as expected.

schellenberghq

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Game Programmer
    • View Profile
    • Blog
Re: NGUI stray UI elements
« Reply #8 on: August 23, 2013, 03:15:25 PM »
The panels GameObject.
---------------------------
Jacob S.
Game Programmer
---------------------------