new MarginContainer()#
MarginContainer is a container that arranges its children with margins. Note: The margins are added to this container's UITransform component.
Name | Type | Default | Description |
---|---|---|---|
top | number | 0 | The top margin. |
bottom | number | 0 | The bottom margin. |
left | number | 0 | The left margin. |
right | number | 0 | The right margin. |
- Source
Extends#
Members#
bottom :number#
The bottom margin.
Type:
- number
- Source
left :number#
The left margin.
Type:
- number
- Source
(readonly) properties#
The entity that this component is attached to.
- Inherited From
- Source
right :number#
The right margin.
Type:
- number
- Source
top :number#
The bottom margin.
Type:
- number
- Source
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.
- Overrides