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

# init(make:update:attachments:)

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

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

## 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.

`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)