Firstborn/Assets/AwesomeTechnologies/VegetationStudioPro/Runtime/Utility/Extentions/LayerMaskExtention.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

21 lines
496 B
C#

using UnityEngine;
namespace AwesomeTechnologies.Utility.Extentions
{
public static class LayerMaskExtention
{
/// <summary>
/// Extension method to check if a layer is in a layermask
/// </summary>
/// <param name="mask"></param>
/// <param name="layer"></param>
/// <returns></returns>
public static bool Contains(this LayerMask mask, int layer)
{
return mask == (mask | (1 << layer));
}
}
}