# SetContactEvents(bool)

> Enable/disable contact events on all shapes attached to the body. See _contactEvents.

## Definition

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

```csharp
public void SetContactEvents(bool contactEvents)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether contact events are allowed on all shapes attached to this body or not.
