using UnityEngine;
public static class LayerMaskExtensions {
///
/// Checks if the given layer number is contained in the LayerMask.
///
/// The LayerMask to check.
/// The layer number to check if it is contained in the LayerMask.
/// True if the layer number is contained in the LayerMask, otherwise false.
public static bool Contains(this LayerMask mask, int layerNumber) {
return mask == (mask | (1 << layerNumber));
}
}