Child Force Expand

The Child Force Expand property will cause the children to fill the available space. If the corresponding Control Child Size is not selected, this property will shift the children so that they and their spacing fill the space. This may override the Spacing property. If the corresponding Control Child Size is selected, it will stretch the children in the selected direction so that they and their spacing completely fill the space. This will maintain the Spacing property.

In the following screenshot, all three panels have a Horizontal Layout Group component with a Middle Left Child Alignment and different combinations of Child Control Size and Child Force Expand selected. The top Panel has only Child Force Expand Width selected, ...

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.