文档

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.
阅读时间1 分钟最后更新于 20 天前

Definition

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

Parameters

layerMask

The value used to set the ContactFilter2D.layerMask.