<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKTextureAtlas",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTextureAtlas"
  },
  "title" : "SKTextureAtlas"
}
-->

# SKTextureAtlas

A collection of textures optimized for storage and drawing performance.

```
class SKTextureAtlas
```

## Overview

An `SKTextureAtlas` 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 [`textureNamed(_:)`](/documentation/SpriteKit/SKTextureAtlas/textureNamed(_:)) 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](/documentation/SpriteKit/about-texture-atlases#Creating-a-Sprite-Atlas)), but you can also put your source textures in an `.atlas` folder in the app bundle.

## Topics

### First Steps

[About Texture Atlases](/documentation/SpriteKit/about-texture-atlases)

Learn about the benefits of having a texture atlas, and the process for using it.

### Accessing Textures

Retrieve textures from an atlas by the textures’ filenames.

[`textureNamed(_:)`](/documentation/SpriteKit/SKTextureAtlas/textureNamed(_:))

Creates a texture from data stored in the texture atlas.

### Creating a Texture Atlas Programmatically

Create an atlas in code.

[`init(named:)`](/documentation/SpriteKit/SKTextureAtlas/init(named:))

Creates a texture atlas from data stored in the app bundle.

[`init(dictionary:)`](/documentation/SpriteKit/SKTextureAtlas/init(dictionary:))

Creates a texture atlas from a set of image files.

### Preloading Textures

Gain fine-tuned control over when an atlas is decoded.

[`preload(completionHandler:)`](/documentation/SpriteKit/SKTextureAtlas/preload(completionHandler:))

Loads an atlas object’s textures into memory, calling a completion handler after the task completes.

[`preloadTextureAtlases(_:withCompletionHandler:)`](/documentation/SpriteKit/SKTextureAtlas/preloadTextureAtlases(_:withCompletionHandler:))

Loads the textures of multiple atlas objects into memory, calling a completion handler after the task completes.

[`preloadTextureAtlasesNamed(_:withCompletionHandler:)`](/documentation/SpriteKit/SKTextureAtlas/preloadTextureAtlasesNamed(_:withCompletionHandler:))

Loads the textures of multiple atlases into memory, calling a completion handler after the task completes.

### Reading Source Image Filenames

Determine whether an atlas contains a particular source image.

[`textureNames`](/documentation/SpriteKit/SKTextureAtlas/textureNames)

The names of the texture images stored in the atlas.

### Instance Properties

[`customPlaygroundQuickLook`](/documentation/SpriteKit/SKTextureAtlas/customPlaygroundQuickLook)

A custom playground quick look for this instance.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)