<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/Model3D/init(from:configurations:transaction:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI7Model3DV4from14configurations11transaction7contentACyxG0A10Foundation6EntityC20ConfigurationCatalogV_SDyS2SGSg0cD011TransactionVxAA0E6DPhaseOctcfc"
  },
  "title" : "init(from:configurations:transaction:content:)"
}
-->

# init(from:configurations:transaction:content:)

Loads and displays a modifiable model using the provided
`ConfigurationCatalog` and configuration choices in phases.

```
nonisolated init(from catalog: Entity.ConfigurationCatalog, configurations: [String : String]? = nil, transaction: Transaction = Transaction(), @ViewBuilder content: @escaping (Model3DPhase) -> Content)
```

## Parameters

`catalog`

A collection of alternative representations for an entity.

`configurations`

A dictionary of configuration choices the initializer applies as it loads the entity,
mapping the ID of a configuration set to the ID of a configuration within that set.

`transaction`

The transaction to use when the phase changes.

`content`

A closure that takes the load phase as an input, and
returns the view to display for the specified phase.

## Discussion

Before the load operation completes, the phase is
[`Model3DPhase.empty`](/documentation/RealityKit/Model3DPhase/empty). After the operation completes, the phase
becomes either [`Model3DPhase.failure(_:)`](/documentation/RealityKit/Model3DPhase/failure(_:)) or
[`Model3DPhase.success(_:)`](/documentation/RealityKit/Model3DPhase/success(_:)). In the first case, the phase’s
[`error`](/documentation/RealityKit/Model3DPhase/error) value indicates the reason for failure.
In the second case, the phase’s [`model`](/documentation/RealityKit/Model3DPhase/model) property
contains the loaded model. Use the phase to drive the output of the
`content` closure, which defines the view’s appearance:

```swift
    Model3D(from: myConfigurationCatalog, configurations: ["vibe": "relaxed"]) { phase in
        if let model = phase.model {
            model // Displays the loaded model.
        } else if phase.error != nil {
            Color.red // Indicates an error.
        } else {
            Color.blue // Acts as a placeholder.
        }
    }
```

To add transitions when you change the name, apply an identifier to the
[`Model3D`](/documentation/RealityKit/Model3D).

---

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)