GridContainer

new GridContainer()

GridContainer is a container that arranges its children in a grid.

Properties
NameTypeDefaultDescription
columnsnumber1

The number of columns in the grid.

rowsnumber1

The number of rows in the grid.

spacingnumber0

The spacing between the children.

Extends

Members

columns :number

The number of columns in the grid.

Type:
  • number

(readonly) properties

The entity that this component is attached to.

Inherited From

rows :number

The number of rows in the grid.

Type:
  • number

spacing :number

Spacing between the children.

Type:
  • number

Methods

Update()

Update all the children's UITransform components. Every time there is a change in the children,or sizes of the container, this method should be called.