Author Topic: 1 Panel / Many GO's or Many Panels for Windows?  (Read 1584 times)

Majicpanda

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 83
    • View Profile
1 Panel / Many GO's or Many Panels for Windows?
« on: January 14, 2013, 02:06:19 PM »
I'm not sure the exact way nGUI is supposed to be used here. 

Let's say you have a Tutorial Window, Inventory Window, Skill Info Window, maybe random Tooltips all pop up under the same Anchor in the middle.. is it best to put all of these under their own Panel or simply create a GameObject for each and nest all widgets associated with each window under the respective GO inside the one panel?

Currently I'm making a separate Panel for every Window type and then toggling it open and close with buttons down on the bottom of my GUI with:
bool toggle = !myWindow.activeSelf;
myWindow.SetActive(toggle);
« Last Edit: January 14, 2013, 02:08:42 PM by Majicpanda »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 1 Panel / Many GO's or Many Panels for Windows?
« Reply #1 on: January 15, 2013, 07:10:21 AM »
Each separate game window should generally be under its own panel, especially if you are animating things in. This is highly dependent on the kind of UI you're making and how much things move / change.