---
title: "init(from:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/clothmeshresource/init(from:)"
---

# init(from:)

Creates a cloth mesh resource from a rendering mesh resource.

## Declaration

```swift
@MainActor convenience init(from mesh: MeshResource) throws
```

## Discussion

Discussion Generates a cloth mesh from a rendering mesh without remeshing. No remeshing is performed. In other words, the resulting ClothMeshResource will match exactly the original MeshResource. from: The MeshResource to generate a ClothMeshResource from.
