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

# replaceAsync(with:)

Replace the contents of this mesh resource asynchronously.

## Declaration

```swift
@MainActor @preconcurrency func replaceAsync(with content: MeshResource.Contents) -> LoadRequest<MeshResource>
```

## Discussion

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

## See Also

### Configuring the resource

- [expectedMaterialCount](realitykit/meshresource/expectedmaterialcount.md)
- [replace(with:)](realitykit/meshresource/replace(with:)-g0kn.md)
- [replace(with:)](realitykit/meshresource/replace(with:)-g0kn.md)
