# 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.

## Definition

* **Type:** Property
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public bool eventGroupingAllowed { readonly get; set; }
```

### Remarks

Every shape in a group must belong to the same body; see [PhysicsWorld.PhysicsGroup](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/physicsgroup.md) for the limitations. See [\_eventGroupingAllowed](/engine/6000.7/script-reference/unity/u2d/physics/physicsworld/eventgroupingallowed.md).
