mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix ui render custom material bug (#11989)
Co-authored-by: ChiaNing <sun.clooud.mo@gmail.com>
This commit is contained in:
@@ -317,6 +317,7 @@ export class UIRenderer extends Renderer {
|
||||
this._colorDirty();
|
||||
uiRendererManager.addRenderer(this);
|
||||
this.markForUpdateRenderData();
|
||||
this.renderEntity.setCustomMaterial(this._customMaterial);
|
||||
}
|
||||
|
||||
// For Redo, Undo
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user