GetTriggerParticles
Get the particles that met the condition in the particle trigger module. Returns the number of particles written to the array.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- 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.
public static int GetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles)
Parameters
Particle system.
Type of trigger to return particles for.
The array of particles matching the trigger event type.
Returns
Type | Description |
|---|---|
| int | Number of particles with this trigger event type. |
Remarks
This method is typically called from MonoBehaviour.OnParticleTrigger() 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.
public static int GetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles, out ParticleSystem.ColliderData colliderData)
Parameters
Particle system.
Type of trigger to return particles for.
The array of particles matching the trigger event type.
Returns
Type | Description |
|---|---|
| int | Number of particles with this trigger event type. |
Remarks
This method is typically called from MonoBehaviour.OnParticleTrigger() in response to a trigger callback.