Member-only story
How to Unity
Unity’s Horizontal, Vertical and Grid Layout Group Explained
What are and how to use the Layout Groups in Unity
A Horizontal (Vertical) Layout Group in Unity is a component used for arranging UI elements horizontally (vertically). It’s handy for creating menus and toolbars or keeping UI elements tidy and equally spaced.
To use the Horizontal (Vertical) Layout Group, add the component to a gameobject, then place the UI elements inside as children. Let’s now go deep into the properties, which apply to both Horizontal Layout Group and Vertical Layout Group
Padding
The padding is the space between the edges of the layout group and the closest items. It defines an invisible border around the group's layout elements or represents the distance between the first (left, top padding) or last (right, bottom padding) elements and the edges.