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

# newTextures(URLs:options:error:)

Synchronously 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, error: NSErrorPointer) -> [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.
- `error`: If all textures were fully loaded and initialized, this pointer is nil on output. If an error occurs while loading any of the specified URLs, this pointer refers to an doc://com.apple.documentation/documentation/Foundation/NSError object describing the failure. (Which element in the URLs array the error corresponds to is undefined.)

## Return Value

Return Value An array of Metal textures, each corresponding to a URL listed in the URLs parameter. If an error occurs while loading a texture, the corresponding array element is an NSNull object.

## 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:completionHandler:)](metalkit/mtktextureloader/newtextures(urls:options:completionhandler:).md)
