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

# insert(_:)

Add a new part to the container. Returns true if added. Returns false if it already exists.

## Declaration

```swift
@discardableResult mutating func insert(_ part: MeshResource.Part) -> Bool
```

## See Also

### Using the collection

- [remove(id:)](realitykit/meshpartcollection/remove(id:).md)
- [removeAll()](realitykit/meshpartcollection/removeall().md)
- [update(_:)](realitykit/meshpartcollection/update(_:).md)
