<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/TextureResource/Contents/init(mipmapLevels:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15TextureResourceC8ContentsV12mipmapLevelsAESayAE11MipmapLevelVG_tcfc"
  },
  "title" : "init(mipmapLevels:)"
}
-->

# init(mipmapLevels:)

Creates a texture contents object from an array of mipmaps.

```
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> Note: Creating 3D textures requires you to build `MipmapLevel` with `mip()` methods that have a `bytesPerImage` parameter.

---

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)