版本 CreatorV2.13
场景打包后,在定位加载场景耗时的时候,在preloadScene的回调中,通过打印每个item加载耗时,发现场景prefab中引用的 碎图在加载场景的时候,依旧会消耗一点时间。 碎图的文件夹中 明明增加了自动图集,按照图集的说法,不是应该直接去加载一个大的图集么,为什么需要又去加载每一张小的碎图,那这样就没啥用了。
附上测试代码:
cc.director.preloadScene(sceneName, (completedCount: number, totalCount: number, item: any) => {
console.log(’[Loading]’, ‘completedCount’, completedCount, ‘totalCount’, totalCount, item.content._name, item, ‘total cost’, (Date.now() - now), ‘ms’);
}, () => {
console.log(’[Loading]’, ‘end’, ‘total cost’, (Date.now() - now), ‘ms’);
});
打印的日志截图:
:
