From 1ab21678c02c7f1ccb85dda35dff3b09a7ac33ac Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 15 May 2021 15:05:28 +0800 Subject: *misc --- Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/Graphic.cs | 1 + Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/GraphicRaycaster.cs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics') 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里的深度,依次增加 /// /// Absolute depth of the graphic, used by rendering and events -- lowest to highest. /// 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 } } + // /// /// Perform a raycast into the screen and collect all graphics underneath it. /// @@ -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; -- cgit v1.1-26-g67d0