fix initialize lifecycle order (#4319)

This commit is contained in:
JoneLau
2019-04-26 18:37:17 +08:00
committed by Weiliang Wang
parent c92eaf9807
commit 64ab55fab7
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ const _worldPos = new Vec3();
* @extends Component
*/
@ccclass('cc.CanvasComponent')
@executionOrder(110)
@executionOrder(99)
@requireComponent(UITransformComponent)
@menu('UI/Canvas')
@executeInEditMode
+3 -3
View File
@@ -338,7 +338,7 @@ export class UI {
const mat = this._currMaterial;
const buffer = this._currMeshBuffer!;
const indicsStart = buffer.indiceStart;
const vCount = this._currMeshBuffer!.indiceOffset - indicsStart;
const vCount = buffer.indiceOffset - indicsStart;
if (!vCount || !mat){
return;
}
@@ -431,12 +431,10 @@ export class UI {
}
this._recursiveScreenNode(screen.node);
this.autoMergeBatches();
}
if (!CC_EDITOR && this._debugScreen && this._debugScreen.enabledInHierarchy) {
this._recursiveScreenNode(this._debugScreen.node);
this.autoMergeBatches();
}
}
@@ -452,6 +450,8 @@ export class UI {
render.postUpdateAssembler(this);
}
});
this.autoMergeBatches();
}
private _reset () {