---
title: arrayLength
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtltexture/arraylength
---

# arrayLength

The number of slices in the texture array.

## Declaration

```swift
var arrayLength: Int { get }
```

## Discussion

Discussion The value of this property ranges from 1 to 2048, inclusive. If the texture type is not an array, this value is 1.

## See Also

### Querying texture attributes

- [textureType](metal/mtltexture/texturetype.md)
- [pixelFormat](metal/mtltexture/pixelformat.md)
- [width](metal/mtltexture/width.md)
- [height](metal/mtltexture/height.md)
- [depth](metal/mtltexture/depth.md)
- [mipmapLevelCount](metal/mtltexture/mipmaplevelcount.md)
- [sampleCount](metal/mtltexture/samplecount.md)
- [isFramebufferOnly](metal/mtltexture/isframebufferonly.md)
- [usage](metal/mtltexture/usage.md)
- [allowGPUOptimizedContents](metal/mtltexture/allowgpuoptimizedcontents.md)
- [isShareable](metal/mtltexture/isshareable.md)
- [swizzle](metal/mtltexture/swizzle.md)
- [MTLTextureType](metal/mtltexturetype.md)
- [MTLTextureUsage](metal/mtltextureusage.md)
