Пример #1
0
        /// <summary>
        /// A raycast with this LayerMask, will hit every layer except the one passed
        /// </summary>
        public static LayerMask LayerAllExcept(string layerName)
        {
            LayerUtility.IsLayerCreated(layerName);

            int layer = LayerUtility.NameToLayer(layerName);

            return(LayerAllExcept(layer));
        }
Пример #2
0
        /// <summary>
        /// A raycast with this LayerMask, will hit every layer except those in the array
        /// </summary>
        public static LayerMask LayerAllExcept(string[] layersName)
        {
            int[] layers = LayerUtility.NameToLayers(layersName);

            return(LayerAllExcept(layers));
        }
Пример #3
0
        /// <summary>
        /// A raycast with this LayerMask, will hit only the layer passed
        /// </summary>
        public static LayerMask LayerOnly(string layerName)
        {
            int layer = LayerUtility.NameToLayer(layerName);

            return(LayerOnly(layer));
        }