# GetTriggerParticles

> Get the particles that met the condition in the particle trigger module. Returns the number of particles written to the array.

## Definition

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

## GetTriggerParticles(ParticleSystem, ParticleSystemTriggerEventType, List\<Particle>)

Get the particles that met the condition in the particle trigger module. Returns the number of particles written to the array.

```csharp
public static int GetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles)
```

### Parameters

**** (\[ParticleSystem]\(/engine/6000.0/script-reference/unityengine/particlesystem)): Particle system.**** (\[ParticleSystemTriggerEventType]\(/engine/6000.0/script-reference/unityengine/particlesystemtriggereventtype)): Type of trigger to return particles for.**** (\[List\<Particle>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The array of particles matching the trigger event type.

### Returns

| Type                                                       | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Number of particles with this trigger event type. |

### Remarks

This method is typically called from [MonoBehaviour.OnParticleTrigger()](/engine/6000.0/script-reference/unityengine/monobehaviour/onparticletrigger.md) in response to a trigger callback.

## GetTriggerParticles(ParticleSystem, ParticleSystemTriggerEventType, List\<Particle>, ColliderData)

Get the particles that met the condition in the particle trigger module. Returns the number of particles written to the array.

```csharp
public static int GetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles, out ParticleSystem.ColliderData colliderData)
```

### Parameters

**** (\[ParticleSystem]\(/engine/6000.0/script-reference/unityengine/particlesystem)): Particle system.**** (\[ParticleSystemTriggerEventType]\(/engine/6000.0/script-reference/unityengine/particlesystemtriggereventtype)): Type of trigger to return particles for.**** (\[List\<Particle>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The array of particles matching the trigger event type.**** (\[ColliderData]\(/engine/6000.0/script-reference/unityengine/particlesystem/colliderdata)):&#x20;

### Returns

| Type                                                       | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Number of particles with this trigger event type. |

### Remarks

This method is typically called from [MonoBehaviour.OnParticleTrigger()](/engine/6000.0/script-reference/unityengine/monobehaviour/onparticletrigger.md) in response to a trigger callback.
