summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-05-15 15:05:28 +0800
committerchai <chaifix@163.com>2021-05-15 15:05:28 +0800
commit1ab21678c02c7f1ccb85dda35dff3b09a7ac33ac (patch)
treef145c241c7620b76c63c835431f4c78d367d222d /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics
parentf342c68d13bddf451ab6cd64fc5b13cf65b65c4f (diff)
*misc
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs1
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs2
2 files changed, 3 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs
index 845bfc4..21acfb4 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs
@@ -154,6 +154,7 @@ namespace UnityEngine.UI
SetAllDirty();
}
+ // 在hierachy里的深度,依次增加
/// <summary>
/// Absolute depth of the graphic, used by rendering and events -- lowest to highest.
/// </summary>
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs
index 2582204..303689a 100644
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs
@@ -249,6 +249,7 @@ namespace UnityEngine.UI
}
}
+ //
/// <summary>
/// Perform a raycast into the screen and collect all graphics underneath it.
/// </summary>
@@ -275,6 +276,7 @@ namespace UnityEngine.UI
}
}
+ // 从高到低,所以会以深度优先。越深的越先响应。
s_SortedGraphics.Sort((g1, g2) => g2.depth.CompareTo(g1.depth));
// StringBuilder cast = new StringBuilder();
totalCount = s_SortedGraphics.Count;