From bc1cb6da854cb2e9144f10ed55330a537ecdca16 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 04 三月 2026 14:35:57 +0800
Subject: [PATCH] 466 h5版本 资源规则修改 打包修改(未完成 勿拉取)

---
 Main/Component/UI/Core/OutlineEx.cs |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/Main/Component/UI/Core/OutlineEx.cs b/Main/Component/UI/Core/OutlineEx.cs
index e37e4b9..f7a3993 100644
--- a/Main/Component/UI/Core/OutlineEx.cs
+++ b/Main/Component/UI/Core/OutlineEx.cs
@@ -1,6 +1,7 @@
 using UnityEngine;
 using UnityEngine.UI;
 using System.Collections.Generic;
+using Cysharp.Threading.Tasks;
 
 
 /// <summary>
@@ -51,15 +52,18 @@
             {
 // #if UNITY_EDITOR
 
-                var texMaterial = ResManager.Instance.LoadAsset<Material>("Materials", "OutlineMat");
-                if (texMaterial != null)
+                ResManager.Instance.LoadAssetAsync<Material>("Materials", "OutlineMat").ContinueWith(texMaterial =>
                 {
-                    base.graphic.material = texMaterial;
-                }
-                else
-                {
-                    Debug.LogError("娌℃湁鎵惧埌鏉愯川OutlineMat.mat");
-                }
+                    if (texMaterial != null)
+                    {
+                        base.graphic.material = texMaterial;
+                    }
+                    else
+                    {
+                        Debug.LogError("娌℃湁鎵惧埌鏉愯川OutlineMat.mat");
+                    }
+                }).Forget();
+
 // #else
 //                 var shader = Shader.Find("TSF Shaders/UI/OutlineEx");
 //                 base.graphic.material = new Material(shader);
@@ -108,15 +112,17 @@
         {
             if (base.graphic.material.shader.name != "TSF Shaders/UI/OutlineEx")
             {
-                var texMaterial = ResManager.Instance.LoadAsset<Material>("Materials", "OutlineMat");
-                if (texMaterial != null)
+                ResManager.Instance.LoadAssetAsync<Material>("Materials", "OutlineMat").ContinueWith(texMaterial =>
                 {
-                    base.graphic.material = texMaterial;
-                }
-                else
-                {
-                    Debug.LogError("娌℃湁鎵惧埌鏉愯川OutlineMat.mat");
-                }
+                    if (texMaterial != null)
+                    {
+                        base.graphic.material = texMaterial;
+                    }
+                    else
+                    {
+                        Debug.LogError("娌℃湁鎵惧埌鏉愯川OutlineMat.mat");
+                    }
+                }).Forget();
                 //var shader = Shader.Find("TSF Shaders/UI/OutlineEx");
                 //base.graphic.material = new Material(shader);
             }

--
Gitblit v1.8.0