---
title: AttachmentContentBuilder
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/attachmentcontentbuilder
---

# AttachmentContentBuilder

A result builder that creates attachment content from closures.

## Declaration

```swift
@resultBuilder struct AttachmentContentBuilder
```

## Overview

Overview The buildBlock methods in this type create AttachmentContent instances based on the number and types of sources provided as parameters. RealityKit calls this builder for you when SwiftUI annotates the attachment parameter of some RealityView initializers that have the @AttachmentContentBuilder annotation.

## Topics

### Type Methods

- [buildBlock()](realitykit/attachmentcontentbuilder/buildblock().md)
- [buildBlock(_:)](realitykit/attachmentcontentbuilder/buildblock(_:).md)
- [buildEither(first:)](realitykit/attachmentcontentbuilder/buildeither(first:).md)
- [buildEither(second:)](realitykit/attachmentcontentbuilder/buildeither(second:).md)
- [buildExpression(_:)](realitykit/attachmentcontentbuilder/buildexpression(_:).md)
- [buildIf(_:)](realitykit/attachmentcontentbuilder/buildif(_:).md)
- [buildLimitedAvailability(_:)](realitykit/attachmentcontentbuilder/buildlimitedavailability(_:).md)

## See Also

### Attachment types

- [AttachmentContent](realitykit/attachmentcontent.md)
- [TuplePackAttachmentContent](realitykit/tuplepackattachmentcontent.md)
- [ConditionalAttachmentContent](realitykit/conditionalattachmentcontent.md)
- [EmptyAttachmentContent](realitykit/emptyattachmentcontent.md)
- [TupleAttachmentContent](realitykit/tupleattachmentcontent.md)
- [AnyAttachmentContent](realitykit/anyattachmentcontent.md)
