[engine] 高级性能指示器兼容不开启动态合图

This commit is contained in:
SmallMain 2024-12-13 17:00:16 +08:00
parent 53091170c4
commit 2faa6c31fd
No known key found for this signature in database

View File

@ -113,7 +113,7 @@ function generateStats () {
},
human() {
const atlases = cc.dynamicAtlasManager.atlases;
if (cc.dynamicAtlasManager && cc.dynamicAtlasManager.enabled) {
const max = cc.dynamicAtlasManager.maxAtlasCount;
const curLess = cc.dynamicAtlasManager.atlasCount;
const oneOfMax = cc.dynamicAtlasManager.textureSize * cc.dynamicAtlasManager.textureSize;
@ -123,6 +123,9 @@ function generateStats () {
cur += rect.sizes;
}
return `${(cur / oneOfMax).toFixed(2)} / ${curLess} / ${max}`;
} else {
return 'disabled';
}
}
},
};