# IgnoreLayerCollision(int, int, bool)

> Choose whether to detect or ignore collisions between a specified pair of layers.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public static void IgnoreLayerCollision(int layer1, int layer2, bool ignore)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): ID of the first layer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): ID of the second layer.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Should collisions between these layers be ignored?

### Remarks

Additional Resources: [Physics2D.GetIgnoreLayerCollision](/engine/6000.6/script-reference/unityengine/physics2d/getignorelayercollision.md).
