Question

Whilst adding image files to an existing atlas today SKTextureAtlas gave a warning saying that I had "exceeded the atlas image size" and that the atlas would be split in two (presumably at compile time as it looks just the same in the editor). After a compile the warning vanished and I could find any more mention of it?

I have since manually split the atlas myself by creating two new atlases, my question is: did I need to do the split myself, is this a warning that says you should really split the atlas in two, or just something letting you know that Xcode is going to do this for you as you compile? Also is there any overhead in letting Xcode do the split, I am assuming its best to do it yourself.

Was it helpful?

Solution

The max image size for a texture atlas is 2000 x 2000 pixels. After the atlas has reached its maximum size, a new atlas is created automatically.

You do not HAVE to create a new atlas yourself as Xcode will do it for you but I personally prefer to keep it below the max so I know what images are part of what atlas without having to look into it. It boils down to your own preference.

Source: Apple's About Texture Atlases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top