---
title: "buildEither(first:)"
framework: realitykit
role: symbol
role_heading: Type Method
path: "realitykit/attachmentcontentbuilder/buildeither(first:)"
---

# buildEither(first:)

Provides support for “if” statements in multi-statement closures, producing conditional content for the “then” branch.

## Declaration

```swift
static func buildEither<TrueContent, FalseContent>(first: TrueContent) -> ConditionalAttachmentContent<TrueContent, FalseContent> where TrueContent : AttachmentContent, FalseContent : AttachmentContent
```
