Hello,
I have a question about how atlases work in Unity (I'm talking about the spine atlas of course).
To sum up:
Does SkeletonData read all the atlases in memory no matter how many it needs, or does it only read the atlases it needs?
(If 1 body atlas and 20 garment atlases, does it read 1 body atlas and 1 garment atlas, or all atlases?)
Does SkeletonData read the full atlas, even if he need only some part of the atlas ?
(The atlas use material, so does all materials are loaded, or only material with used piece inside)
And here's the full version, enjoy 🍻 :
And on an atlas, does it load all the images, or just the images it needs? (If it has 14 images, but the parts it needs are on images 1,2,4,7,8 and 9, does it load them all?)
I used to create atlases with the standard Spine exporter, creating a single atlas of more or less 30 MB. Having said that, I know that the weight of the image in the game is not the same as the weight on Windows. This created 12 images with a single .atlas.txt (because Unity uses .atlas too, so you changed it to .atlas.txt).
If my research is correct, during the Spine animation, all atlases were loaded into memory at the same time. Even if you were to use only part of images 1, 5 and 7, the whole atlas was loaded.
The problem is that the garments take up a lot of space and aren't all needed at the same time, so I started thinking "Maybe I should create an atlas for each garment".
This is a bit tedious to do, so I used "GDX Texture Packer" to do it and created 24 different atlases. 1 for the body, variation included (I could divide it into each body variation but I'm sure it's not worth it for the few different body parts...).
The thing is, I tried to see if there were any differences in my game using separate atlases or single atlases, but I couldn't see them.
At the moment I "only" have 20 different garments, but later I'll have more and more, and it's easier to add them to the atlas one by one than to wait until there are more than 80 garments to think "Maybe I should add an atlas".