I'm building a SpriteKit game which will have a lot of animated sprites. I am using TextureAtlases.
SKTextureAtlas is written in ObjectiveC and wrapped in NS_ASSUME_NONNULL_BEGIN
- meaning, if a textureAtlas with the appropriate name does not exist, the app will throw an exception. Since I will be having a lot of animations, I expect messing up from time to time and trying to access a texture atlas that I did not, in fact, provide.
I am currently using a workaround that supplies a different textureAtlas in case of textureAtlas.textureNames.isEmpty
but is there a way of directly checking the validity of a SKTextureAtlas returned from init(named:)?