# GetMeshIndex(ParticleSystem)

> Calculate the Mesh index of the particle, used for choosing which Mesh a particle is rendered with.

## Definition

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

```csharp
public int GetMeshIndex(ParticleSystem system)
```

### Parameters

**** (\[ParticleSystem]\(/engine/6000.7/script-reference/unityengine/particlesystem)): The Particle System from which this particle was emitted.

### Returns

| Type                                                       | Description                                            |
| ---------------------------------------------------------- | ------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the mesh used for rendering the particle. |
