Documentation

Unity Engine


Unity Engine


layerMask

Sets the contact filter to filter the results that only include Collider2D on the layers defined by the layer mask.
Read time 1 minuteLast updated 15 days ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public LayerMask layerMask

Remarks

This field takes effect if ContactFilter2D.useLayerMask is true.
Additional Resources: LayerMask