Skip to content

GridLayout

extends LayoutGroup

The GridLayout combines the characteristics of both horizontal and vertical layout containers, allowing child controls to be automatically arranged in both directions.

To obtain a GridLayout object, refer to Control.layoutGroup.

成员变量

GridLayout.fillDirection : LayoutFillDirectionType
The starting fill direction type of the child controls in the grid layout.
GridLayout.fillStart : LayoutFillStartType
The starting fill position type of the child controls in a grid layout.
GridLayout.spacing : Vector2
The spacing between child controls in a grid layout.
GridLayout.fillLimit : LayoutFillLimitType
The constraint type for the number of rows and columns of child controls in a grid layout.
GridLayout.fillLimitNum : number
Limits the number of child controls in a grid layout per row/column.