preContactCallbacks
Controls if pre-contact and pre-continuous callbacks will be called. This only applies to Dynamic bodies and is ignored for triggers. These are relatively expensive so disabling them can provide a significant performance benefit.
読み終わるまでの所要時間 1 分最終更新 22日前
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public bool preContactCallbacks { get; set; }
Remarks
A shape only produces these callbacks if its own PhysicsShape.preContactCallbacks is also set. The deprecated IPreSolveCallback is also driven by this switch, for targets that only implement it.