diff --git a/Scripts/Effects/SoftMaskScript.cs b/Scripts/Effects/SoftMaskScript.cs index e8cb169..080462b 100644 --- a/Scripts/Effects/SoftMaskScript.cs +++ b/Scripts/Effects/SoftMaskScript.cs @@ -30,9 +30,11 @@ namespace UnityEngine.UI.Extensions [Tooltip("Flip the masks alpha value")] public bool FlipAlphaMask = false; - [Tooltip("If Mask Scals Rect is given, and this value is true, the area around the mask will not be clipped")] + [Tooltip("If Mask Scaling Rect is given and this value is true, the area around the mask will not be clipped")] public bool DontClipMaskScalingRect = false; + [Tooltip("If set to true, this mask is applied to all child Text and Graphic objects belonging to this object.")] + public bool CascadeToALLChildren; Vector3[] worldCorners; Vector2 AlphaUV; @@ -41,7 +43,10 @@ namespace UnityEngine.UI.Extensions Vector2 max = Vector2.one; Vector2 p; Vector2 siz; + Vector2 tp = new Vector2(.5f, .5f); + + bool MaterialNotSupported; // UI items like toggles, we can stil lcascade down to them though :) Rect maskRect; Rect contentRect; @@ -75,11 +80,39 @@ namespace UnityEngine.UI.Extensions // For some reason, having the mask control on the parent and disabled stops the mouse interacting // with the texture layer that is not visible.. Not needed for the Image. - if (transform.parent.GetComponent() == null) + if (transform.parent.GetComponent