Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ContactFilter2D.layerMask

public LayerMask layerMask;

Description

Sets the contact filter to filter the results that only include Collider2D on the layers defined by the layer mask.

This field takes effect if useLayerMask is true.

See Also: LayerMask.