fix ui render custom material bug (#11989)

Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
This commit is contained in:
ChiaNing
2022-07-14 04:28:27 -05:00
committed by GitHub
parent 016418626d
commit eeb210d55b
3 changed files with 1 additions and 2 deletions
+1
View File
@@ -317,6 +317,7 @@ export class UIRenderer extends Renderer {
this._colorDirty();
uiRendererManager.addRenderer(this);
this.markForUpdateRenderData();
this.renderEntity.setCustomMaterial(this._customMaterial);
}
// For Redo, Undo
-1
View File
@@ -1318,7 +1318,6 @@ export class Skeleton extends UIRenderer {
public onEnable () {
super.onEnable();
this._renderEntity.setCustomMaterial(this.customMaterial);
this._flushAssembler();
SkeletonSystem.getInstance().add(this);
}
@@ -527,7 +527,6 @@ const cacheManager = require('./jsb-cache-manager');
this._flushAssembler();
armatureSystem.getInstance().add(this);
middleware.retain();
this._renderEntity.setCustomMaterial(this.customMaterial);
};
const _onDisable = superProto.onDisable;