# eventMask

> Mask to select which layers can trigger events on the camera.

## Definition

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

```csharp
public int eventMask { get; set; }
```

### Remarks

Just as the camera's `cullingMask` determines if the camera is able to see the [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md), the event mask determines whether the [GameObject](/engine/6000.7/script-reference/unityengine/gameobject.md) is able to receive mouse events. Only objects visible by the camera and whose `layerMask` overlaps with the camera's `eventMask` will be able to receive OnMouseXXX events. Setting this mask to zero will improve performance and is recommended if you don't use OnMouseXXX events. See [Layers](/engine/6000.7/manual/working-with-gameobjects/layers.md) for more information.

Additional Resources: [MonoBehaviour.OnMouseEnter()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseenter.md), [MonoBehaviour.OnMouseExit()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseexit.md), [MonoBehaviour.OnMouseOver()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseover.md), [MonoBehaviour.OnMouseDown()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmousedown.md), [MonoBehaviour.OnMouseOver()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseover.md), [MonoBehaviour.OnMouseUp()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseup.md), [MonoBehaviour.OnMouseDrag()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmousedrag.md), [MonoBehaviour.OnMouseUpAsButton()](/engine/6000.7/script-reference/unityengine/monobehaviour/onmouseupasbutton.md).
