Laya2.4版本,场景为内嵌时layaMaxUI类中没有声明场景中的Button等控件?

export module ui {
export class GameSceneuiUI extends Laya.Scene {
public static uiView:any ={"type":"Scene","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart","label":"label"},"compId":3}],"loadList":["comp/button.png"],"loadList3D":[]};
constructor(){ super()}
createChildren():void {
super.createChildren();
this.createView(GameSceneuiUI.uiView);
}
}
REG("ui.GameSceneuiUI",GameSceneuiUI);
export class GameViewUI extends Laya.View {
public static uiView:any ={"type":"View","props":{"width":720,"height":1280},"compId":2,"child":[{"type":"Button","props":{"y":616,"x":296,"skin":"comp/button.png","name":"butStart","label":"label"},"compId":3},{"type":"Label","props":{"text":"label","name":"labelName"},"compId":4}],"loadList":["comp/button.png"],"loadList3D":[]};
constructor(){ super()}
createChildren():void {
super.createChildren();
this.createView(GameViewUI.uiView);
}
}
REG("ui.GameViewUI",GameViewUI);
}
已邀请:

要回复问题请先

商务合作
商务合作