creator2.13自动图集场景加载时,引用的碎图依旧是每个依次加载耗时

版本 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’);
});

打印的日志截图:

:

自动图集打包才生效,预览还是使用碎图

是打包后的

好吧,知道问题了,场景load的时候,里面每个itemCb返回的是 每个资源加载完成的callback,对于prefab引用的 不管是自动图集还是自己打包的图集,没一个spriteFrame load完成之后,都会执行这个itemCb。