Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsMask

Create a PhysicsMask by specifying multiple bits to set (1).
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Constructor
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

PhysicsMask(int[])

Create a PhysicsMask by specifying multiple bits to set (1).
public PhysicsMask(params int[] bitIndices)

Parameters

bitIndices

The indices of the bits to set in the mask. An index must be in the range [0, 63].

PhysicsMask(LayerMask)

Create a PhysicsMask from a LayerMask. A LayerMask is only 32-bits wide so the PhysicsMask will have the upper 32-bits set to zero.
public PhysicsMask(LayerMask layerMask)

Parameters

layerMask

The LayerMask to use.