From 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 17:46:11 +0800
Subject: [PATCH] webgl代码合并 1

---
 Main/Component/UI/Core/ImageEx.cs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Main/Component/UI/Core/ImageEx.cs b/Main/Component/UI/Core/ImageEx.cs
index f93f64d..22959ca 100644
--- a/Main/Component/UI/Core/ImageEx.cs
+++ b/Main/Component/UI/Core/ImageEx.cs
@@ -62,5 +62,17 @@
             this.SetSprite(m_IconKey);
         }
     }
+
+    protected override void OnEnable()
+    {
+        base.OnEnable();
+
+        #if UNITY_EDITOR
+        if (material != null)
+        {
+            material.shader = Shader.Find(material.shader.name);
+        }
+        #endif
+    }
 }
 

--
Gitblit v1.8.0