---
title: "replace(with:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/meshresource/replace(with:)"
---

# replace(with:)

Replace the contents of this mesh resource.

## Declaration

```swift
@MainActor @preconcurrency func replace(with content: MeshResource.Contents) throws
```

## Discussion

Discussion note: The contents of the modified mesh resource will not be synced between network clients.
