From 61b188e1d59af9a1e3b4f005bd4b9211b2db97d8 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 09 十月 2025 15:46:31 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/Utility/UIUtility.cs |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/Main/Utility/UIUtility.cs b/Main/Utility/UIUtility.cs
index f4fbbb2..1ae82d0 100644
--- a/Main/Utility/UIUtility.cs
+++ b/Main/Utility/UIUtility.cs
@@ -310,24 +310,6 @@
         vertexHelper.AddTriangle(currentVertCount, currentVertCount + 1, currentVertCount + 2);
     }
 
-    // public static string GetUIElementRelativePath(UIRoot _root, Transform _transform)
-    // {
-    //     List<Transform> parents = new List<Transform>() { _transform };
-    //     GetParents(_transform, ref parents);
-
-    //     if (parents.Contains(_root.transform))
-    //     {
-    //         parents.Remove(_root.transform);
-    //     }
-
-    //     var names = new string[parents.Count];
-    //     for (int i = 0; i < names.Length; i++)
-    //     {
-    //         names[i] = parents[i].gameObject.name;
-    //     }
-
-    //     return string.Join("/", names);
-    // }
 
     public static void GetParents(Transform _transform, ref List<Transform> _parents)
     {
@@ -344,4 +326,22 @@
         }
     }
 
+    public static string GetUIElementRelativePath(Transform _root, Transform _transform)
+    {
+        List<Transform> parents = new List<Transform>() { _transform };
+        GetParents(_transform, ref parents);
+
+        if (parents.Contains(_root))
+        {
+            parents.Remove(_root);
+        }
+
+        var names = new string[parents.Count];
+        for (int i = 0; i < names.Length; i++)
+        {
+            names[i] = parents[i].gameObject.name;
+        }
+
+        return string.Join("/", names);
+    }
 }

--
Gitblit v1.8.0