A utility class for working with LayerMasks in Unity. Includes functions to check if a GameObject or a layer is part of a specified LayerMask.
More...
|
static bool | IsInLayerMask (GameObject obj, LayerMask mask) |
| Checks if a GameObject is in the specified LayerMask.
|
|
static bool | IsInLayerMask (int layer, LayerMask mask) |
| Checks if a layer is in the specified LayerMask.
|
|
A utility class for working with LayerMasks in Unity. Includes functions to check if a GameObject or a layer is part of a specified LayerMask.
Definition at line 9 of file LayerMaskUtility.cs.
◆ IsInLayerMask() [1/2]
static bool IsInLayerMask |
( |
GameObject | obj, |
|
|
LayerMask | mask ) |
|
static |
Checks if a GameObject is in the specified LayerMask.
- Parameters
-
obj | The GameObject to check. |
mask | The LayerMask to check against. |
- Returns
- True if the GameObject is in the specified LayerMask, otherwise false.
◆ IsInLayerMask() [2/2]
static bool IsInLayerMask |
( |
int | layer, |
|
|
LayerMask | mask ) |
|
static |
Checks if a layer is in the specified LayerMask.
- Parameters
-
layer | The layer index to check. |
mask | The LayerMask to check against. |
- Returns
- True if the layer is in the specified LayerMask, otherwise false.
The documentation for this class was generated from the following file:
- C:/Users/christian.backstrom/Documents/Unity/FCV/FCV-Engine/Assets/Scripts/Utility/LayerMaskUtility.cs