UIPanelManager

The UIPanelManager class allows you to easily switch between multiple panels in a mutually exclusive way to achieve things such as menus and wizards. Panels which are to be managed by a given UIPanelManager must be children of it in the scene hierarchy.

Navigation
You may navigate through a sequence of panels which are part of a UIPanelManager by using some of the built-in button types for this purpose, such as UIBtnChangePanel, or you can use the class's various methods to navigate via your own code.

There are primarily two ways of navigating between panels using UIPanelManager: linear and non-linear.

Linear Navigation
Linear navigation involves telling the UIPanelManager that you either want to move forward or backward in a sequence of panels (specified using their index setting). This is useful for things like wizards or other types of menus that proceed linearly.

Non-Linear Navigation
Non-linear navigation involves telling the UIPanelManager which panel, out of two or more possible panels, to show next without following a linear sequence. The currently-showing panel will be "dismissed" automatically and the specified panel will be brought in. This is the preferred method for non-linear menus such as main menus as well as control grouping techniques such as a tabbed interface.

For more information on using UIPanelManager, see the "recipes" for managed panels on the Using Panels page, or the UIPanelManager section of the scripting reference.

Properties

Initial Panel
Set this to whichever panel, if any, is showing initially.

NOTE: if you set this to a specific panel and that panel is not already showing at start, then if you call code or use a button to bring the panel in, it will not respond since the manager thinks that it is already showing, and therefore ignores the instruction to show it again.
Deactivate All But Initial At Start
When the scene starts, all managed panels, except for the initial one (if any), will be deactivated recursively. This is handy when you want the panels to be visible in-editor while working with them, but do not want them getting in the way at runtime.

NOTE: If you have objects inside a panel that you wish to be deactivated even when the panel is showing, do not use this setting as it will cause panels to be recursively activated when brought into view.
Linear Navigation
When true, the internal navigation logic of the manager assumes that all navigation will proceed one panel to the next in a predefined order without "skipping around". Set this to true for wizard-like menus.
Circular
When true, the panels are intended to be navigated in a circular fashion, meaning that when you advance to the next or previous panels, if the end has been reached, it wraps back to the beginning, or vice versa. This option also forces linear navigation (same as setting the lienarNavigation setting to true).
Advance Past End
When true, calling MoveBack() or MoveForward(), or using a control to do the same, at the first panel or last panel in a series will cause the current panel to be dismissed and is replaced with nothing. This is useful for when you want, for example, to be able to press a "Next" button at the last panel of a wizard and have it dismiss the last panel to make way for something else on the screen.
Dismiss On Move Off
When true, the panel will be dismissed when the pointer is moved away from the panel and its child controls. This is useful, for example, when you want a menu that only remains showing only while the pointer is hovering over it. Such as a menu bar drop-down.
Show On Child Click
When true, if any child is clicked/tapped while the panel is hidden, the panel will be shown.
Initial State
The starting state of the panel (i.e. HIDDEN or SHOWING). Set this to match whether the panel will be hidden or showing at start.