[engine] 新 Char 缓存模式实现

This commit is contained in:
SmallMain
2022-06-25 00:54:38 +08:00
parent bfbb3511eb
commit adb32f5c23
5 changed files with 368 additions and 51 deletions

View File

@@ -483,6 +483,10 @@ let Label = cc.Class({
if (oldValue === CacheMode.CHAR) {
this._ttfTexture = null;
const material = this._materials[0];
if (material && material.material && cc.Label._shareAtlas.material === material.material) {
this.setMaterial(0, this._getDefaultMaterial());
}
}
if (!this.enabledInHierarchy) return;