---
title: TextureResource.Contents.Slice
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/textureresource/contents/slice
---

# TextureResource.Contents.Slice

An object that references the pixel data for a single slice of a mipmap.

## Declaration

```swift
struct Slice
```

## Overview

Overview 2D array textures have arrayLength slices per mipmap, and cube textures have six slices per mipmap. 2D and 3D textures have a single slice per mipmap.

## Topics

### Creating a texture slice

- [slice(data:bytesPerRow:)](realitykit/textureresource/contents/slice/slice(data:bytesperrow:).md)
- [slice(unsafeBuffer:offset:size:bytesPerRow:)](realitykit/textureresource/contents/slice/slice(unsafebuffer:offset:size:bytesperrow:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Defining the content

- [TextureResource.Contents.MipmapLevel](realitykit/textureresource/contents/mipmaplevel.md)
