Background: We have migrated our CC 2.1 project to CC3.3.1 and we found out that game kept crashing on low memory phones. After tracing down the errors, it was due to huge number of drawcalls from AutoAtlas bug.
Problem: Basically, if an autoatlas is added to a folder, it should automatically merge individual images into one large image and remove individual images during the build process. Now in CC 3.3.1, an autoatlas created inside resources folder is NOT removing individual images and at the same time, it’s also creating the merged images and that resulted in additional images inside resources folder. Hence, more processing needed to render.
To replicate, check the attached project’s build folder. You will find individual images and a merged image. Individual images should not be there.
@StudioAMK Have you tried creating a separate folder and set it as a bundle and load it dynamically that way?
You could also try moving out the images into the main bundle (the bundle that is created for things that are not in a bundle or in “resources”) and only keeping the prefabs in the resources folder to dynamically loading the prefabs and images are linked to the prefabs, so they won’t load before you request the prefab loading.
I know, a lot of stupid workarounds. Strange that this has happened in 3.3.1, feels like quite a big bug. Have you tried 3.3.2 if it would have been fixed?
I think, if you set a folder as a bundle, autoatlas will not work (they stated that in their document, I think).
On the other hand, since the project is already on play store, we can’t play around much.
I’m not sure about 3.3.2.
Right now, we decided not to upgrade, unless we can be sure of it and we have time to test all the required features, because Cocos upgrade usually bring random new issues.
If you make the same configuration at another folder which is not in resources folder, the individuals images will get deleted after they are merged.
On the other hand, my understanding for the options you showed are for unused files removal. It’s nothing to do with auto-atlas at resources folder producing individual images and merged images, right? Please correct me if I’m wrong.