Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BakeMesh

Creates a snapshot of ParticleSystemRenderer and stores it in a mesh.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • 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.
public void BakeMesh(Mesh mesh, bool useTransform = false)

Parameters

mesh

A static Mesh to receive the snapshot of the particles.

useTransform

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.
public void BakeMesh(Mesh mesh, Camera camera, bool useTransform = false)

Parameters

mesh

A static Mesh to receive the snapshot of the particles.

camera

The Camera used to determine which way camera-space particles face.

useTransform

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
.
public void BakeMesh(Mesh mesh, ParticleSystemBakeMeshOptions options)

Parameters

mesh

A static Mesh to receive the snapshot of the particles.

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
.
public void BakeMesh(Mesh mesh, Camera camera, ParticleSystemBakeMeshOptions options)

Parameters

mesh

A static Mesh to receive the snapshot of the particles.

camera

The Camera used to determine which way camera-space particles face.

Specifies whether to include the rotation and scale of the Transform in the baked Mesh.