Layouts can be used to easily organize multiple menu items, support dynamic menus with a varying number of components or create scrollable menus.
Layouts are defined by the way they fill.
Vertical | Components are arranged vertically. Vertical Layout Properties |
Horizontal | Components are arranged horizontally. Horizontal Layout Properties |
Wrapping | Define the width of the layout, when components exceed that width they will create a new row. Wrapping Layout Properties |
Scroller | Define the width or height of the layout, when components that width they will be cropped by the layout and the user can scroll the menu to see all the components. Scroller Properties |
When a new component is added to the layout it will automatically be placed relative to the component added before it.
When components are reordered in the hierarchy panel they will automatically change position in the layout.
Widgets are collections of components that can be added or removed from layouts while your game is running.
Add & Remove Widgets Demo Game