---
title: "update(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/meshmodelcollection/update(_:)"
---

# update(_:)

Update an existing model. The old model is returned.

## Declaration

```swift
@discardableResult mutating func update(_ model: MeshResource.Model) -> MeshResource.Model?
```

## See Also

### Using the collection

- [insert(_:)](realitykit/meshmodelcollection/insert(_:).md)
- [remove(id:)](realitykit/meshmodelcollection/remove(id:).md)
- [removeAll()](realitykit/meshmodelcollection/removeall().md)
- [subscript(_:)](realitykit/meshmodelcollection/subscript(_:).md)
