# BakeMesh

> Creates a snapshot of ParticleSystemRenderer and stores it in a mesh.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.ParticleSystemModule

## BakeMesh(Mesh, bool)

Creates a snapshot of ParticleSystemRenderer and stores it in a `mesh`.

> **Warning:**
>
> **Deprecated.** BakeMesh with useTransform is deprecated. Use BakeMesh with ParticleSystemBakeMeshOptions instead.

```csharp
public void BakeMesh(Mesh mesh, bool useTransform = false)
```

### Parameters

**** (\[Mesh]\(/engine/6000.7/script-reference/unityengine/mesh)): A static Mesh to receive the snapshot of the particles.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Specifies whether to include the rotation and scale of the Transform in the baked Mesh.

## BakeMesh(Mesh, Camera, bool)

Creates a snapshot of ParticleSystemRenderer and stores it in a `mesh`.

> **Warning:**
>
> **Deprecated.** BakeMesh with useTransform is deprecated. Use BakeMesh with ParticleSystemBakeMeshOptions instead.

```csharp
public void BakeMesh(Mesh mesh, Camera camera, bool useTransform = false)
```

### Parameters

**** (\[Mesh]\(/engine/6000.7/script-reference/unityengine/mesh)): A static Mesh to receive the snapshot of the particles.**** (\[Camera]\(/engine/6000.7/script-reference/unityengine/camera)): The Camera used to determine which way camera-space particles face.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Specifies whether to include the rotation and scale of the Transform in the baked Mesh.

## BakeMesh(Mesh, ParticleSystemBakeMeshOptions)

Creates a snapshot of ParticleSystemRenderer and stores it in a `mesh`.

```csharp
public void BakeMesh(Mesh mesh, ParticleSystemBakeMeshOptions options)
```

### Parameters

**** (\[Mesh]\(/engine/6000.7/script-reference/unityengine/mesh)): A static Mesh to receive the snapshot of the particles.**** (\[ParticleSystemBakeMeshOptions]\(/engine/6000.7/script-reference/unityengine/particlesystembakemeshoptions)): Specifies whether to include the rotation and scale of the Transform in the baked Mesh.

## BakeMesh(Mesh, Camera, ParticleSystemBakeMeshOptions)

Creates a snapshot of ParticleSystemRenderer and stores it in a `mesh`.

```csharp
public void BakeMesh(Mesh mesh, Camera camera, ParticleSystemBakeMeshOptions options)
```

### Parameters

**** (\[Mesh]\(/engine/6000.7/script-reference/unityengine/mesh)): A static Mesh to receive the snapshot of the particles.**** (\[Camera]\(/engine/6000.7/script-reference/unityengine/camera)): The Camera used to determine which way camera-space particles face.**** (\[ParticleSystemBakeMeshOptions]\(/engine/6000.7/script-reference/unityengine/particlesystembakemeshoptions)): Specifies whether to include the rotation and scale of the Transform in the baked Mesh.
