> For the complete documentation index, see [llms.txt](https://docs.engagevr.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.engagevr.io/developer/afx/node-dictionary/unity/physics/raycast/layer-mask.md).

# Layer Mask

## Layer Mask Get Mask

Given a set of layer names, returns the equivalent layer mask for all of them. For more information, refer to [LayerMask.GetMask](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/LayerMask.GetMask.html) in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="171">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Layer Name List</td><td>List &#x3C;string></td><td>List of layer names.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="171">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Output</td><td>Integer</td><td>A layer mask for the given layers.</td></tr></tbody></table>

## Layer to Name

Given a layer number, outputs the name of the layer. For more information, refer to [LayerMask.LayerToName](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/LayerMask.LayerToName.html) in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Layer</td><td>Integer</td><td>A layer number</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Output</td><td>String</td><td>The name of the layer.</td></tr></tbody></table>

## Name to Layer

Given a layer name, returns the layer index. For more information, refer to [LayerMask.NameToLayer](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/LayerMask.NameToLayer.html) in the Unity documentation.

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Layer Name</td><td>String</td><td>The name of a layer.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Output</td><td>Integer</td><td>The layer number.</td></tr></tbody></table>

## Layer Mask Select Layer Mask

Get a layer index for a chosen layer mask.

**Parameters:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Mask</td><td>List</td><td>You can select one of the following pre-set masks: Nothing, Everything, Default, TransparentIFX, Ignore Raycast, Water, or UI.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="160">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Output</td><td>Integer</td><td>An integer that references the chosen mask.</td></tr></tbody></table>
