mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 10:32:39 +08:00
fix initialize lifecycle order (#4319)
This commit is contained in:
@@ -43,7 +43,7 @@ const _worldPos = new Vec3();
|
||||
* @extends Component
|
||||
*/
|
||||
@ccclass('cc.CanvasComponent')
|
||||
@executionOrder(110)
|
||||
@executionOrder(99)
|
||||
@requireComponent(UITransformComponent)
|
||||
@menu('UI/Canvas')
|
||||
@executeInEditMode
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user