From 09dbaad203fa9eaaa16abf683add04267f82439d Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Sat, 6 Jun 2020 16:41:30 +0900 Subject: [PATCH] feat: add a new public property 'useStencil' --- Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs b/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs index 2141d5b..9659268 100755 --- a/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs +++ b/Packages/SoftMaskForUGUI/Scripts/SoftMaskable.cs @@ -71,6 +71,20 @@ namespace Coffee.UISoftMask set { m_RaycastFilter = value; } } + /// + /// Use stencil to mask. + /// + public bool useStencil + { + get { return m_UseStencil; } + set + { + if (m_UseStencil == value) return; + m_UseStencil = value; + graphic.SetMaterialDirtyEx(); + } + } + /// /// The graphic associated with the soft mask. ///