Version: 2022.3
言語: 日本語
public static int GetCollisionEvents (ParticleSystem ps, GameObject go, List<ParticleCollisionEvent> collisionEvents);

パラメーター

go 衝突イベントを取得する GameObject
collisionEvents 衝突イベントを記述する配列
ps The Particle System that owns the potentially colliding particles.

戻り値

int The number of collision events.

説明

ゲームオブジェクトのパーティクル衝突イベントを取得します。配列に書き込まれたイベントの数を返します。

このメソッドは一般的に衝突のコールバックへのレスポンスとして MonoBehaviour.OnParticleCollision から呼び出されます。

If the array used is too short, the list of collision events will be truncated. This means you will not have every event that occurred. To avoid this use ParticlePhysicsExtensions.GetSafeCollisionEventSize to determine an appropriate array size prior the call.

See Also: MonoBehaviour.OnParticleCollision.


Obsolete public static int GetCollisionEvents (ParticleSystem ps, GameObject go, ParticleCollisionEvent[] collisionEvents);

説明

Deprecated: Use the overload that takes a List. That overload doesn't create garbage.