---
title: "replaceAll(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/scene/anchorcollection/replaceall(_:)-5t195"
---

# replaceAll(_:)

Replaces the existing anchor collection with a provided sequence.

## Declaration

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

## Parameters

- `entities`: A sequence of anchors to replace the existing collection.

## See Also

### Replacing anchors

- [replaceAll(_:)](realitykit/scene/anchorcollection/replaceall(_:)-tris.md)
