# excludeLayers

> The additional layers that this Collider should exclude when deciding if the Collider can contact another Collider.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public LayerMask excludeLayers { get; set; }
```

### Remarks

The Layer Collision Matrix defines which layers can contact other layers. Use this property to specify additional layers that this specific [Collider](/engine/6000.0/script-reference/unityengine/collider.md) instance should not contact.

When deciding which layers can contact each other, the Layer Collision Matrix first includes layers, then excludes layers. If a layer is set to be included and excluded, it is excluded.

**NOTE**: Layers can be included or excluded differently depending on the settings of each [Collider](/engine/6000.0/script-reference/unityengine/collider.md) instance. As such, there could be a conflicting decision for whether two [Collider](/engine/6000.0/script-reference/unityengine/collider.md) instances can come into contact with each other. To learn how Unity decides this, see [Collider.layerOverridePriority](/engine/6000.0/script-reference/unityengine/collider/layeroverridepriority.md).

Additional Resources: [Collider.includeLayers](/engine/6000.0/script-reference/unityengine/collider/includelayers.md), [Rigidbody.includeLayers](/engine/6000.0/script-reference/unityengine/rigidbody/includelayers.md), [Rigidbody.excludeLayers](/engine/6000.0/script-reference/unityengine/rigidbody/excludelayers.md), [ArticulationBody.includeLayers](/engine/6000.0/script-reference/unityengine/articulationbody/includelayers.md), [ArticulationBody.excludeLayers](/engine/6000.0/script-reference/unityengine/articulationbody/excludelayers.md).
