touchCircle and lifeOutline both use the same Atlas, and it is a 4096x4096 atlas. We plan on reducing it to multiple 2048 atlases for the sake of the maximum atlas size on apple devices, but that is just a matter of time. Could the size of the atlas be a memory issue?
-Justin
This, my friend! The bigger the Atlas-Size the bigger the RAM consumption. If you look into the Atlas-Data in the Unity-Inspector you will see how much of RAM the Atlas will consume when loaded.
So here is my advice:
- make them smaller. Not only the Size but also Format (which has also a big impact on the RAM-Size)
For example, I have one TextureAtlas for my Sky-Background which is a PSD-File/Sprite with a Gradient. It's 2kb in RAM-Usage (Max Size is set to 64 and Format is set to "RGB Compressed PVRTC 4bits"). Of course I could set it to 4096 and RGBA 32, but that would be just dumb, because there is absolutely NO difference in quality, at least you can't see it with your eyes
In order to save fillrate unikron told me to split up sprites in two parts: one part with transparencie the other one is solid. Now this will save you also a lot of memory, cause your solid-part has (in best case) only on colour. My Solid-Part-Textureatlas is set to 512 in Size and the same RGB Compression in the Format Setting and gives me a RAM-Usage of 128 kb.
With GUI, Character, Enemies, Backgrounds etc. I got something like 80-90 MB of RAM Usage, that being said, only the Background-Atlases are optimized, so I think I'll go down to 60-70 after optimizing the Atlases of the Player, the Enemies etc.