mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
UIRenderer.updateMaterial should not be marked as (#18320)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user