---
title: "init(mipmapLevels:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/textureresource/contents/init(mipmaplevels:)"
---

# init(mipmapLevels:)

Creates a texture contents object from an array of mipmaps.

## Declaration

```swift
init(mipmapLevels: [TextureResource.Contents.MipmapLevel])
```

## Parameters

- `mipmapLevels`: Pixel data for each mipmap level, starting with mipmap level 0. Supply at least one mipmap level.

## Discussion

Discussion note: Creating 3D textures requires you to build MipmapLevel with mip() methods that have a bytesPerImage parameter.
