From 08dd874a91d7e6e4a6dba3dfcabaebe57c86103e Mon Sep 17 00:00:00 2001 From: szrpf <27185709@qq.com> Date: Fri, 26 May 2023 16:20:37 +0800 Subject: [PATCH] v2.1 --- assets/Script/DataBoard.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/Script/DataBoard.ts b/assets/Script/DataBoard.ts index 3bbe088..738ecb5 100644 --- a/assets/Script/DataBoard.ts +++ b/assets/Script/DataBoard.ts @@ -142,12 +142,12 @@ export default class DataBoard extends cc.Component { private customLabelStringSplit: string[] = null; private monitorComp: cc.Component = null; - protected onLoad() { + protected start() { + this.boardNode = this.node.getChildByName('DataBoard'); if (!CC_EDITOR && !window['DATABOARD']) { this.destroy(); return; } - this.boardNode = this.node.getChildByName('DataBoard'); if (cc.isValid(this.boardNode)) { this.boardNode.removeFromParent(); this.boardNode.destroy(); @@ -310,7 +310,7 @@ export default class DataBoard extends cc.Component { if (cc.isValid(this.boardNode)) { this.boardNode.removeFromParent(); this.boardNode.destroy(); - }; + } this.node.targetOff(this); } } \ No newline at end of file