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

# preloadTextureAtlases(_:withCompletionHandler:)

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

```
class func preloadTextureAtlases(_ textureAtlases: [SKTextureAtlas], withCompletionHandler completionHandler: @escaping @Sendable () -> Void)
```

## Parameters

`textureAtlases`

An array of [`SKTextureAtlas`](/documentation/SpriteKit/SKTextureAtlas) objects.

`completionHandler`

A block called after all of the texture atlases are loaded.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> class func preloadTextureAtlases(_ textureAtlases: [SKTextureAtlas]) async
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

SpriteKit creates a background task that loads the texture data from all of the specified atlas objects. Then, SpriteKit returns control to your game. After the atlas objects are loaded, your completion handler is called.

---

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)