GetSafeCollisionEventSize(ParticleSystem)
Safe array size for use with ParticlePhysicsExtensions.GetCollisionEvents.
Read time 1 minuteLast updated 18 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.ParticleSystemModule
public static int GetSafeCollisionEventSize(this ParticleSystem ps)
Parameters
The particle system that the colliding particles belong to.
Returns
Type | Description |
|---|---|
| int | The minimum array size needed to capture every collision event for the particle system in the current frame. |
Remarks
This is guaranteed to be large enough to use with ParticlePhysicsExtensions.GetCollisionEvents for the current frame. GetCollisionEvents might return fewer elements for some GameObjects.