I have a group of Sprites that will be compiled into an Auto Atlas at build, and I have placed a reference to the .pac file in my code. I would like to reference the each sprite individually though, for example: atlas.getSpriteFrames()[1]
AutoAtlas offers a .getSpriteFrames(), but because atlases are not built during preview, it turns up empty.
What is the best practice for retrieving a SpriteFrame from an AutoAtlas that is able to run under preview mode?
Should I ignore the AutoAtlas and
- use loader/loadRes to load the sprites individually?
OR - set up an array of SpriteFrames and populate with references to individual sprites?
1 post - 1 participant