<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalKit",
  "identifier" : "/documentation/MetalKit/MTKTextureLoader/newTextures(URLs:options:error:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MetalKit"
    ],
    "preciseIdentifier" : "c:objc(cs)MTKTextureLoader(im)newTexturesWithContentsOfURLs:options:error:"
  },
  "title" : "newTextures(URLs:options:error:)"
}
-->

# newTextures(URLs:options:error:)

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

```
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

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 <doc://com.apple.documentation/documentation/Foundation/NSNull> object.

## Discussion

---

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)