---
title: "init(mesh:materials:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/modelentity/init(mesh:materials:)"
---

# init(mesh:materials:)

Creates a model entity with a particular mesh and set of materials.

## Declaration

```swift
@MainActor @preconcurrency init(mesh: MeshResource, materials: [any Material] = [])
```

## Parameters

- `mesh`: A mesh that defines the geometry of the model.
- `materials`: Material resources that define the appearance of the model.

## See Also

### Creating a model

- [init()](realitykit/modelentity/init().md)
- [init(mesh:materials:collisionShape:mass:)](realitykit/modelentity/init(mesh:materials:collisionshape:mass:).md)
- [init(mesh:materials:collisionShapes:mass:)](realitykit/modelentity/init(mesh:materials:collisionshapes:mass:).md)
