---
title: "init(named:bundle:content:placeholder:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/model3d/init(named:bundle:content:placeholder:)"
---

# init(named:bundle:content:placeholder:)

Loads and displays a modifiable model by name, by searching through the specified Bundle, using a custom placeholder until the model loads.

## Declaration

```swift
nonisolated init<Model, Placeholder>(named name: String, bundle: Bundle? = nil, @ViewBuilder content: @escaping (ResolvedModel3D) -> Model, @ViewBuilder placeholder: @escaping () -> Placeholder) where Content == Model3DPlaceholderContent<Model, Placeholder>, Model : View, Placeholder : View
```

## Parameters

- `name`: The name of the USD or Reality file to display.
- `bundle`: The Bundle used to look up the model by name. If not provided, defaults to the app’s main bundle.
- `content`: A closure that takes the loaded model as an input, and returns the view to show. You can return the model directly, or modify it as needed before returning it.
- `placeholder`: A closure that returns the view to show until the load operation completes successfully.

## Discussion

Discussion Until the model loads, Model3D displays the placeholder view that you specify. When the load operation completes successfully, SwiftUI updates the view to show content that you specify, which you create using the loaded model. For example, you can show a green placeholder, followed by a scaled version of the loaded model: Model3D(named: "Robot-Drummer") { model in     model.resizable() } placeholder: {     Color.green } If the load operation fails, Model3D continues to display the placeholder. To be able to display a different view on a load error, use the  init(named:bundle:transaction:content:) initializer instead.

## See Also

### Creating a Model3D

- [init(named:bundle:)](realitykit/model3d/init(named:bundle:).md)
- [init(named:bundle:transaction:content:)](realitykit/model3d/init(named:bundle:transaction:content:).md)
- [init(url:)](realitykit/model3d/init(url:).md)
- [init(url:content:placeholder:)](realitykit/model3d/init(url:content:placeholder:).md)
- [init(url:transaction:content:)](realitykit/model3d/init(url:transaction:content:).md)
