---
title: AnyAttachmentContent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/anyattachmentcontent
---

# AnyAttachmentContent

A type-erased attachment content.

## Declaration

```swift
@MainActor @frozen @preconcurrency struct AnyAttachmentContent
```

## Overview

Overview An AnyAttachmentContent allows changing the type of attachment used in a given attachment content. Whenever the type of attachment content used with an AnyAttachmentContent changes, the old content is destroyed and the new content is created for the new type.

## Topics

### Initializers

- [init(_:)](realitykit/anyattachmentcontent/init(_:).md)

## Relationships

### Conforms To

- [AttachmentContent](realitykit/attachmentcontent.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Attachment types

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