diff options
author | chai <chaifix@163.com> | 2021-04-12 09:42:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-04-12 09:42:52 +0800 |
commit | 6aed8a5cf13145e6291e4e95ee6774d5e5b4b3b8 (patch) | |
tree | 7dc78e64917910dc57f472be9bf5edb610b741d0 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask | |
parent | b357a6a6d914e46c2c782f215e9f566f92663850 (diff) |
+effect
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs index 87d2dbf..5f8f2e7 100644 --- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs +++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask/RectMask2D.cs @@ -22,6 +22,7 @@ namespace UnityEngine.UI [NonSerialized] private bool m_ShouldRecalculateClipRects; + // 父节点的所有RectMask2D,用来算交集 [NonSerialized] private List<RectMask2D> m_Clippers = new List<RectMask2D>(); @@ -101,7 +102,7 @@ namespace UnityEngine.UI public virtual void PerformClipping() { //TODO See if an IsActive() test would work well here or whether it might cause unexpected side effects (re case 776771) - + // if the parents are changed // or something similar we // do a recalculate here @@ -111,6 +112,8 @@ namespace UnityEngine.UI m_ShouldRecalculateClipRects = false; } + // 裁剪 + // get the compound rects from // the clippers that are valid bool validRect = true; @@ -125,6 +128,8 @@ namespace UnityEngine.UI m_LastValidClipRect = validRect; } + // 剔除 + foreach (IClippable clipTarget in m_ClipTargets) { var maskable = clipTarget as MaskableGraphic; |