Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


eventGroupingAllowed

Controls if contact and trigger begin/end events for shapes assigned a group are marked as being the first or last event between the two groups involved. This allows the many events produced between two groups of shapes to be reduced to a single begin and end, such as when treating multiple shapes on one body as a single object. The marking is only calculated for shapes assigned a group and only when a begin or end event is produced, so the cost of leaving this enabled is minor.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public bool eventGroupingAllowed { get; set; }

Remarks

Every shape in a group must belong to the same body; see PhysicsWorld.PhysicsGroup for the limitations. See _physicsGroup and PhysicsWorld.CreateGroup.