A collection of textures optimized for storage and drawing performance.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
SKTexture is a collection of textures that were either created from an
.atlas folder in the app bundle, or created at runtime. Texture atlases improve memory usage and rendering performance by reducing draw calls. Whenever you have textures that are always used together, store them in an atlas for best results.
SpriteKit implicitly loads an atlas when one of the atlas's textures is accessed. Use
texture when you want to explicitly access a texture atlas’s contents.
The preferred place to create a texture atlas is within an asset catalog (see Creating a Sprite Atlas), but you can also put your source textures in an
.atlas folder in the app bundle.