From 994cda07491be0e460c78bd9c8400780530ad07c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 07 十一月 2025 16:42:32 +0800
Subject: [PATCH] 0312 增加椭圆形遮罩

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

diff --git a/Main/Utility/UIUtility.cs b/Main/Utility/UIUtility.cs
index 224e0d7..1ae82d0 100644
--- a/Main/Utility/UIUtility.cs
+++ b/Main/Utility/UIUtility.cs
@@ -3,7 +3,7 @@
 using UnityEngine;
 using UnityEngine.UI;
 using UnityEngine.EventSystems;
-using vnxbqy.UI;
+
 
 
 public static class UIUtility
@@ -11,7 +11,7 @@
 
     public static GameObject CreateWidget(string _sourceName, string _name)
     {
-        var prefab = ResManager.Instance.LoadAsset<GameObject>("UIComp", _sourceName);
+        var prefab = UILoader.LoadPrefab(_sourceName);
         if (prefab == null)
         {
             return null;
@@ -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