MarginContainer#

new MarginContainer()#

MarginContainer is a container that arranges its children with margins. Note: The margins are added to this container's UITransform component.

Properties
NameTypeDefaultDescription
topnumber0

The top margin.

bottomnumber0

The bottom margin.

leftnumber0

The left margin.

rightnumber0

The right margin.

Extends#

Members#

bottom :number#

The bottom margin.

Type:
  • number

left :number#

The left margin.

Type:
  • number

(readonly) properties#

The entity that this component is attached to.

Inherited From

The right margin.

Type:
  • number

top :number#

The bottom margin.

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.