---
title: "newTextures(names:scaleFactor:bundle:options:completionHandler:)"
framework: metalkit
role: symbol
role_heading: Instance Method
path: "metalkit/mtktextureloader/newtextures(names:scalefactor:bundle:options:completionhandler:)"
---

# newTextures(names:scaleFactor:bundle:options:completionHandler:)

Asynchronously loads image data and creates Metal textures from the specified list of named texture assets in an asset catalog.

## Declaration

```swift
func newTextures(names: [String], scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]? = nil, completionHandler: @escaping @Sendable ([any MTLTexture], (any Error)?) -> Void)
```

```swift
func newTextures(names: [String], scaleFactor: CGFloat, bundle: Bundle?, options: [MTKTextureLoader.Option : Any]? = nil) async throws -> [any MTLTexture]
```

## Parameters

- `names`: An array of strings, each the name of a texture in an asset catalog.
- `scaleFactor`: The scale factor of texture to request. In iOS and tvOS, pass the doc://com.apple.documentation/documentation/QuartzCore/CALayer/contentsScale value of the view where you plan to display texture content. In macOS, pass the doc://com.apple.documentation/documentation/AppKit/NSWindow/backingScaleFactor value of the window where you plan to display texture content.
- `bundle`: The resource bundle containing the asset catalog to load textures from.
- `options`: A dictionary describing any additional texture loading steps. See Texture Loading Options. When using this method, the texture loader ignores the doc://com.apple.metalkit/documentation/MetalKit/MTKTextureLoader/Option/generateMipmaps, doc://com.apple.metalkit/documentation/MetalKit/MTKTextureLoader/Option/SRGB, doc://com.apple.metalkit/documentation/MetalKit/MTKTextureLoader/Option/cubeLayout, and doc://com.apple.metalkit/documentation/MetalKit/MTKTextureLoader/Option/origin options.
- `completionHandler`: A block called after all assets 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(names: [String], scaleFactor: CGFloat, bundle: Bundle?, 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 Asset Catalogs

- [newTexture(name:scaleFactor:bundle:options:)](metalkit/mtktextureloader/newtexture(name:scalefactor:bundle:options:).md)
- [newTexture(name:scaleFactor:bundle:options:completionHandler:)](metalkit/mtktextureloader/newtexture(name:scalefactor:bundle:options:completionhandler:).md)
- [newTexture(name:scaleFactor:displayGamut:bundle:options:)](metalkit/mtktextureloader/newtexture(name:scalefactor:displaygamut:bundle:options:).md)
- [newTexture(name:scaleFactor:displayGamut:bundle:options:completionHandler:)](metalkit/mtktextureloader/newtexture(name:scalefactor:displaygamut:bundle:options:completionhandler:).md)
- [newTextures(names:scaleFactor:displayGamut:bundle:options:completionHandler:)](metalkit/mtktextureloader/newtextures(names:scalefactor:displaygamut:bundle:options:completionhandler:).md)
