using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEngine.UI; namespace MoreMountains.Tools { /// /// Layermask Extensions /// public static class LayermaskExtensions { /// /// Returns bool if layer is within layermask /// /// /// /// public static bool MMContains(this LayerMask mask, int layer) { return ((mask.value & (1 << layer)) > 0); } /// /// Returns true if gameObject is within layermask /// /// /// /// public static bool MMContains(this LayerMask mask, GameObject gameobject) { return ((mask.value & (1 << gameobject.layer)) > 0); } } }