---
title: "setObjectTextures(_:range:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlrendercommandencoder/setobjecttextures(_:range:)"
---

# setObjectTextures(_:range:)

Assigns multiple textures to a range of entries in the object shader argument table.

## Declaration

```swift
func setObjectTextures(_ textures: [(any MTLTexture)?], range: Range<Int>)
```

## Parameters

- `textures`: An array of doc://com.apple.metal/documentation/Metal/MTLTexture instances the command assigns to entries in the object shader argument table for textures.
- `range`: A span of integers that represent the entries in the object shader argument table for textures. Each entry stores a record of the corresponding element in textures.

## Discussion

Discussion By default, the texture at each index is nil. note: The Objective-C version of this method is setObjectTextures:withRange:.

## See Also

### Assigning textures for object shaders

- [setObjectTexture(_:index:)](metal/mtlrendercommandencoder/setobjecttexture(_:index:).md)
