---
title: "replaceAll(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entity/childcollection/replaceall(_:)"
---

# replaceAll(_:)

Removes all children from this entity and adds the specified list of entities as the new children.

## Declaration

```swift
@MainActor @preconcurrency func replaceAll<S>(_ children: S) where S : Sequence, S.Element : Entity
```

## Parameters

- `children`: The list of the new children.
