# PhysicsLayers

> 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 LayerMask ) will be used.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public readonly struct PhysicsLayers
```

## Static Fields

| Value                                                                                                                     | Description                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [InvalidLayerOrdinal](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicslayers/invalidlayerordinal.md) | Indicates 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](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicslayers/getlayermask.md)       | Get a [PhysicsMask](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsmask.md) for the specified layer name(s).                                 |
| [GetLayerName](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicslayers/getlayername.md)       | Get a layer name for the specified layer ordinal (index).                                                                                                          |
| [GetLayerOrdinal](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicslayers/getlayerordinal.md) | 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. |
