diff --git a/cocos/2d/framework/ui-renderer.ts b/cocos/2d/framework/ui-renderer.ts index 620a3c6c49..c8cb77fec4 100644 --- a/cocos/2d/framework/ui-renderer.ts +++ b/cocos/2d/framework/ui-renderer.ts @@ -471,8 +471,11 @@ export class UIRenderer extends Renderer { } /** + * cocos-test-projects/assets/cases/rendertexture depends on this method, so it should not be marked as `@mangle` now. + * FIXME(cjh): `protected` is not equal to `@engineInternal + public`, because `protected` methods are also APIs exposed to developers, + * For example, developers could implement a class which extends `UIRenderer` and call this method. + * The mistake was merged in https://github.com/cocos/cocos-engine/pull/14572 , and it needs to be fixed in the future. * @engineInternal - * @mangle */ public updateMaterial (): void { if (this._customMaterial) { diff --git a/cocos/dragon-bones/ArmatureDisplay.ts b/cocos/dragon-bones/ArmatureDisplay.ts index d1045265d8..bcf8243c31 100644 --- a/cocos/dragon-bones/ArmatureDisplay.ts +++ b/cocos/dragon-bones/ArmatureDisplay.ts @@ -711,11 +711,11 @@ export class ArmatureDisplay extends UIRenderer { /** * @engineInternal */ - public updateMaterial (): void { - let mat; + public override updateMaterial (): void { + let mat: Material; if (this._customMaterial) mat = this._customMaterial; else mat = this._updateBuiltinMaterial(); - this.setSharedMaterial(mat as Material, 0); + this.setSharedMaterial(mat, 0); this._cleanMaterialCache(); } diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 152d783c77..8d6f84a729 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -1193,7 +1193,7 @@ export class Skeleton extends UIRenderer { /** * @engineInternal */ - public updateMaterial (): void { + public override updateMaterial (): void { let mat: Material; if (this._customMaterial) mat = this._customMaterial; else mat = this._updateBuiltinMaterial();