<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/RealityView/init(make:update:placeholder:attachments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit",
      "SwiftUI",
      "_RealityKit_SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI0A4ViewV4make6update11placeholder11attachmentsACyAA0aE24AttachmentBuilderContentVyqd__AA0aeL0V4BodyVy_qd_0_GGGyAKz_AA0aE11AttachmentsVtYaYbScMYcc_yAKz_ARtScMYccSgqd_0_yXEqd__yctcAORszAA0jL0Rd__0cD00E0Rd_0_r0_lufc"
  },
  "title" : "init(make:update:placeholder:attachments:)"
}
-->

# init(make:update:placeholder:attachments:)

Creates a reality view for visionOS, with attachments,
an optional update closure,
and placeholder view.

```
nonisolated init<A, P>(make: @escaping @MainActor @Sendable (inout RealityViewContent, RealityViewAttachments) async -> Void, update: (@MainActor (inout RealityViewContent, RealityViewAttachments) -> Void)? = nil, @ViewBuilder placeholder: () -> P, @AttachmentContentBuilder attachments: @escaping () -> A) where Content == RealityViewAttachmentBuilderContent<A, RealityViewContent.Body<P>>, A : AttachmentContent, P : View
```

## Parameters

`make`

An asynchronous closure that configures the
initial content of the new `RealityView`.
This closure is asynchronous to keep your app’s UI responsive while
you load content to populate this view.

`update`

An optional closure that updates the `RealityView`
instance’s content as the view’s state changes.

`placeholder`

A temporary view that the [`RealityView`](/documentation/RealityKit/RealityView) displays until
your closure for the `make` parameter completes.
For example, you can display a loading indicator with a
<doc://com.apple.documentation/documentation/SwiftUI/ProgressView>
instance as a placeholder.

`attachments`

An attachment content builder that adds attachment
views to the content of the `RealityView`.

## Discussion

This initializer doesn’t automatically add the attachment views to your [`RealityViewContent`](/documentation/RealityKit/RealityViewContent).
You can access the entities that represent the attachments by calling
the [`entity(for:)`](/documentation/RealityKit/RealityViewAttachments/entity(for:)) method of the
[`RealityViewAttachments`](/documentation/RealityKit/RealityViewAttachments), and add them to your content or as a child of another [`Entity`](/documentation/RealityKit/Entity):

```swift
RealityView { content, attachments in
    if let attachment = attachments.entity(for: "example") {
        content.add(attachment)
    }
} attachments: {
    Attachment(id: "example") {
        Text("hello")
    }
}
```

---

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)