Sample overview

Depending on current screen aspect ratio panel will have different layouts. This is useful when the application supports different orientations (Portrait, Landscape).

HorizontalAndVerticalLayoutContentProvider.cs - populates two different layouts, depending on the screen aspect ratio

Vertical layout

image.png

Horizontal layout

image.png

Depending on the screen orientation DebugPanel will call different methods for UI population.

For vertical layout

For vertical layout

For horizontal layout

For horizontal layout

Horizontal layout usually can fit more content, so you can add additional vertical groups and even tabs.

<aside> 🔄

Debug panel will automatically refresh itself whenever screen aspect ratio changed. Try to enter Free Aspect in GameView and change to resize the window.

</aside>