UnityEssentials
Small but useful tools and features for Unity
LayerMaskExtensions.cs
Go to the documentation of this file.
1 namespace UnityEngine
2 {
6 
7  public static class LayerMaskExtensions
8  {
9 
15 
16  public static bool Contains(this LayerMask mask, int layerNumber)
17  {
18  return mask == (mask | (1 << layerNumber));
19  }
20  }
21 }
static bool Contains(this LayerMask mask, int layerNumber)
Checks if the LayerMask contains a given layer.