---
title: "newTextures(URLs:options:completionHandler:)"
framework: metalkit
role: symbol
role_heading: Instance Method
path: "metalkit/mtktextureloader/newtextures(urls:options:completionhandler:)"
---

# newTextures(URLs:options:completionHandler:)

Asynchronously loads image data and creates new Metal textures from the specified list of URLs.

## Declaration

```swift
func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping @Sendable ([any MTLTexture], (any Error)?) -> Void)
```

```swift
func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [any MTLTexture]
```

## Parameters

- `URLs`: An array of URLs referencing files to load.
- `options`: A dictionary describing any additional texture loading steps. See Texture Loading Options.
- `completionHandler`: A block called after all URLs have been processed. See the doc://com.apple.metalkit/documentation/MetalKit/MTKTextureLoader/ArrayCallback signature to determine whether each texture has successfully loaded.

## Discussion

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: func newTextures(URLs: [URL], options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [MTLTexture] For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Loading Textures from URLs

- [newTexture(URL:options:)](metalkit/mtktextureloader/newtexture(url:options:).md)
- [newTexture(URL:options:completionHandler:)](metalkit/mtktextureloader/newtexture(url:options:completionhandler:).md)
- [newTextures(URLs:options:error:)](metalkit/mtktextureloader/newtextures(urls:options:error:).md)
