# GetMeshes(Mesh[])

> Gets the array of Meshes to use when selecting particle meshes.

## Definition

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

```csharp
public int GetMeshes(Mesh[] meshes)
```

### Parameters

**** (\[Mesh\[]]\(/engine/6000.0/script-reference/unityengine/mesh)): An array this function populates with the list of Meshes the ParticleSystemRenderer uses for particle Mesh selection. If the array is smaller than the number of Meshes, this function cannot populate it with every Mesh. If the array is larger than the number of Meshes, this function ignores indices greater than the number of Meshes. Use [ParticleSystemRenderer.meshCount](/engine/6000.0/script-reference/unityengine/particlesystemrenderer/meshcount.md) to get the number of Meshes the ParticleSystemRenderer has.

### Returns

| Type                                                       | Description                                                        |
| ---------------------------------------------------------- | ------------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of Meshes this function wrote to the destination array. |

### Remarks

Additional Resources: [ParticleSystemRenderer.renderMode](/engine/6000.0/script-reference/unityengine/particlesystemrenderer/rendermode.md).
