Class: LayoutSystem
Arranges children of any LayoutComponent host. Runs after WidgetSystem so a Widget-anchored container is positioned before its children get packed inside it.
Sizing (resizeMode): None — arrange only; child UITransform width/height read as-is. Container — after measuring, the HOST UITransform is resized to fit the children's taken size (main axis for H/V, row-stack height for Grid). Children — children are resized to fill the host (cross axis for H/V, column cell for Grid) before arranging. With affectedByChildScale, a child's taken size is UITransform size × |transform scale|. Inactive children are skipped and consume no space. Grid is row-major.
Extends
Constructors
Constructor
ts
new LayoutSystem(): LayoutSystem;Returns
LayoutSystem
Inherited from
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
enabled | public | boolean | true | System.enabled |
parallel | public | boolean | false | System.parallel |
Methods
GetName()
ts
GetName(): string;Returns
string
Overrides
GetOrder()
ts
GetOrder(): SystemOrder;Returns
SystemOrder
GetPhase()
ts
GetPhase(): SystemPhase;Returns
Overrides
GetWrites()
ts
GetWrites(): readonly string[];Returns
readonly string[]
OnClose()
ts
OnClose(): void;Returns
void
Inherited from
OnInit()
ts
OnInit(_engine): void;Parameters
| Parameter | Type |
|---|---|
_engine | IEngine |
Returns
void
Inherited from
OnRender()
ts
OnRender(scene, _renderer): void;Parameters
| Parameter | Type |
|---|---|
scene | Scene |
_renderer | IRenderer |
Returns
void
Overrides
OnRendererChanged()
ts
OnRendererChanged(_renderer): void;Parameters
| Parameter | Type |
|---|---|
_renderer | IRenderer |
Returns
void
Inherited from
OnStart()
ts
OnStart(_scene, _renderer): void;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
_renderer | IRenderer |
Returns
void
Inherited from
OnStop()
ts
OnStop(_scene): void;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
Returns
void
Inherited from
OnUpdate()
ts
OnUpdate(_scene, _dt): void | Promise<void>;Parameters
| Parameter | Type |
|---|---|
_scene | Scene |
_dt | number |
Returns
void | Promise<void>