---
title: "init(shape:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/meshresource/init(shape:)"
---

# init(shape:)

Generates a MeshResource from a ShapeResource.

## Declaration

```swift
@MainActor @preconcurrency convenience init(shape resource: ShapeResource)
```

## Parameters

- `resource`: The ShapeResource which will be used for generating the mesh.
