Author Topic: Is there any reason to use a panel for visibility?  (Read 1741 times)

Rafe

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Is there any reason to use a panel for visibility?
« on: August 05, 2012, 06:09:26 PM »
Hi,

I noticed SetActive takes a gameobject. Can I just use empty gameobjects for setting branches of my GUI visibility? Is there any reason to to stick to toggling panels?

I think I assumed this would be a good idea because of the Panel Tool (which is awesome by the way, and I will still use it for the big chunks regardless).

Cheers,

- Rafe

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Is there any reason to use a panel for visibility?
« Reply #1 on: August 05, 2012, 06:37:51 PM »
Any game object works, and doesn't have to do anything with NGUI. It's SetActiveRecursively equivalent, except that it enables objects in a proper order -- parents before children. SetActiveRecursively enables children before parents, which is bizarre.