GetSafeCollisionEventSize(ParticleSystem)
Safe array size for use with ParticlePhysicsExtensions.GetCollisionEvents.
阅读时间1 分钟最后更新于 16 天前
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.