这个可以升级至最新引擎或者改成如下样子
TextTexture.ts
discard(): void {
// 文字贴图的释放要触发全局cacheas normal无效
ILaya.stage.setGlobalRepaint();
// 不再使用问题贴图的重用,否则会有内容清理问题
this.destroy();
return;
}
static getTextTexture(w: number, h: number): TextTexture {
// 不再回收
return new TextTexture(w, h);
}