BomberUnits
...a Unity learning project
Menu page System

The UI Menu Page System

System Requirements

The menu page system is intended to provide animations for menu components as well as grouping, but still allow to use the Unity-inherent Layout features etc.

The classic approach is having multiple full menu "pages" readily set up with all their children on the canvas at the same time. These would then be made visible or invisible as pages are switched. We instead want to be able to animate and pan into view the individual elements (often panels with buttons and images) independently. By parenting, also complex UI elements can be animated with this of course.

The concrete menus may be found in the GDD under the Doc folder or in the Game Design section once written :)

System Solution

Unity provides its own Animation system, which we also use to realize State Machines. Have a look here for details: How to animate .

This animation system is one, quite flexible approach handle movement and appearance of UI elements, as opposed to hard-coding the element movements.

In addition, for the transition of pages, another State machine is used.

SW Requirements

The system should be independent of the specific project. One should be able to set up an arbitrary menu without having to change the code.

SW Solution

See The Menu Page System for details on the SW structure.

And see How to use the Menu Page System for instructions on how to set up menus with the system.