NGUI Performances. Should I use more than a panel or not?

Hi guys. I’m actually creating a UI system with NGUI and that must work on mobile devices. There is always visible a top banner with a logo and some information about the current status of the app, and a bottom toolbar (also always visible). Between them (on the center of the screen) I must place some different views (e.g. login form, options, dialogs, alerts… etc).

Actually I have created a panel for each GUI view and all of them are under the Anchor gameobject. The banner and the toolbar are always active while I’m switching the other panels by deactivating the gameobject when needed.

Now I’m wondering if it is more performant (and correct) to have just one panel and different GUI views to activate when it is needed. In this case I would have one single panel and different gameobjects that will contains the widgets. To switch between the different UIs I would use the activation of those gameobjects.

What do you think is the most performant and correct way? I’m opened also at different way to do the same thing.

Thanks !!! :slight_smile:

Stupid question? Probably it was, but for the sake of it this is what I’ve found.

Actually a panel is responsible to draw the widgets on the screen so basically if you have all your windgets in one sigle panel, every of them will be drawn in a single draw call.
If you have multiple panels every one of them will be responsible of its own content multipling the draw calls for the number of the panels present in the app.
For this reasons, I think that having a single panel with multiple views to activate at the right time is the most performant operation to do.

Feel free to post your considerations here :wink:

NGUI forum: NGUI 3 Support

thanks dkozar :slight_smile: