Documentation

Unity Engine


Unity Engine


SetLayerMask(LayerMask)

Sets the ContactFilter2D.layerMask filter property using the layerMask parameter provided and also enables layer mask filtering by setting ContactFilter2D.useLayerMask to true.
Read time 1 minuteLast updated a month ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public void SetLayerMask(LayerMask layerMask)

Parameters

layerMask

The value used to set the ContactFilter2D.layerMask.