Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetHitEvents(bool)

Enable/disable hit events on all shapes attached to the body. See _hitEvents.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public void SetHitEvents(bool hitEvents)

Parameters

hitEvents

Whether hit events are allowed on all shapes attached to this body or not.