Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

PhysicsMask

struct in UnityEngine.LowLevelPhysics2D

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 64-bit mask, effectively 64 flags. The default enumerator will iterate all the bits that are set (1).

Static Properties

Property Description
All All 64 bits set (1) in the PhysicsMask.
None No bits set in the PhysicsMask, effectively zero.
One Bit #0 set (1) in the PhysicsMask. The remaining bits are reset (0).

Properties

Property Description
bitMask A 64-bit mask, effectively 64 flags.

Constructors

Constructor Description
PhysicsMask Create a PhysicsMask by specifying multiple bits to set (1).

Public Methods

Method Description
AreBitsSet Checks if the provided PhysicsMask set bits are also set in this PhysicsMask.
IsBitSet Is the specified bit set.
ResetBit Reset (0) the specified bit.
SetBit Set (1) the specified bit.
ToLayerMask Convert the lower 32-bits of the 64-bit mask to the 32-bit UnityEngine.LayerMask. A UnityEngine.LayerMask is only 32-bits wide so the upper 32-bits of the PhysicsMask will be ignored.