diff --git a/assets/core/gui/layer/LayerUI.ts b/assets/core/gui/layer/LayerUI.ts index 032ac9f..549255f 100644 --- a/assets/core/gui/layer/LayerUI.ts +++ b/assets/core/gui/layer/LayerUI.ts @@ -113,8 +113,8 @@ export class LayerUI extends Node { viewParams.valid = true; let comp: DelegateComponent = viewParams.node.getComponent(DelegateComponent)!; - viewParams.node.parent = this; comp.add(); + viewParams.node.parent = this; return viewParams.node; }