Environment
I'm using Unity Pro 4.5.2f1 and NGUI 3.6.8, on Mac OS X 10.9.4. I'm new to both, but an expert developer and have been using C# for a decade.
Problem
What is the best way to show/hide sets of UI controls so they don't 'interfere' with each other?
Background
I have about 14 'Menu Screens' of UI for this game and most of it happens before any 'game environment' scene is loaded; it's all configuration and setup, upgrades, navigation drill down, etc.
I decided to use a single .unity scene, MenuScene, for all of these 'menu screens'. I manage the game state in the script component MenuGUI, with filename MenuGUI.cs, attached to a UIWidget, named GameWidget, as the first child of UIRoot.
I have multiple UIPanels in the scene which each host a set of controls for a given 'menu screen'. There are also some controls that are on all screens so they're always present in the root.
I've been through the 5 video tutorials for NGUI 3.6, and have about 6 of the 14 screens setup
Just using .enable = true/false on the UIPanel seems like it's not enough, even with what seemed like proper depth settings, or programmatically managing the panel and child control's depth settings.
My controls are mainly made up of sprites with UIButton and Box Collider components. I utilize normal and pressed sprites, as well as selected sprites on some controls. I have created three atlases with all of the controls. One Atlas is for all the menu sprites for the drill down navigation screens and common screen controls. One is for the the upgrades system screens, and the final atlas is for the options screens control sprites. With a little overlap, only one atlas is needed for any menu screen.
Solutions?
Should I move the entire UIPanel 'out of the screen bounds' after i disable it (enabled = false)? If I don't do this, the wrong targets are being hit by the mouse on occasion.
Should I disable the collider? Is that what I'm missing?
Notes:
I have noticed what may be a few bugs. I will try to verify and post them as soon as I can.
For example:
I have tried to disable the default color tweens by selecting None as target but it resets the tween target to the sprite every reload.
Is there a way to do this permanently?