# GetLayerMask(params string[])

> Get a PhysicsMask for the specified layer name(s).

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

## GetLayerMask(string\[])

```csharp
public static PhysicsMask GetLayerMask(params string[] layerNames)
```

### Parameters

**** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)): The layer names (case sensitive) to find a combined physics mask for.

### Returns

| Type                                                                            | Description                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PhysicsMask](/engine/6000.5/script-reference/unity/u2d/physics/physicsmask.md) | The combined physics mask associated with the specified layer names or, if not found, [PhysicsMask.None](/engine/6000.5/script-reference/unity/u2d/physics/physicsmask/none.md) will be returned in which case a console warning will also be produced. |
