summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-04-12 09:42:52 +0800
committerchai <chaifix@163.com>2021-04-12 09:42:52 +0800
commit6aed8a5cf13145e6291e4e95ee6774d5e5b4b3b8 (patch)
tree7dc78e64917910dc57f472be9bf5edb610b741d0 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Mask
parentb357a6a6d914e46c2c782f215e9f566f92663850 (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.cs7
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;