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

PhysicsLayers

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

This provides a common method to retrieving layer information. If a PhysicsLowLevelSettings2D asset is assigned then the full layers (PhysicsLowLevelSettings2D.physicsLayerNames) will be used if PhysicsLowLevelSettings2D.useFullLayers is also active. If no PhysicsLowLevelSettings2D asset is assigned then the global layers (See UnityEngine.LayerMask) will be used.

Static Properties

Property Description
InvalidLayerOrdinal Indivates an invalid layer ordinal. This is typically used when retrieving a layer ordinal but a name could not be found.

Static Methods

Method Description
GetLayerMask Get a PhysicsMask for the specified layer name(s).
GetLayerName Get a layer name for the specified layer ordinal (index).
GetLayerOrdinal Get a layer ordinal (index) for the specified layer name. This is not a 32-bit mask but simply the layer ordinal (index) associated with the specified layer name.