From 11187d7c6a46a82f10b3d097b8291e59d721b50c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 10 十二月 2025 20:30:57 +0800
Subject: [PATCH] 0312 修改隐私协议的弹出时机为android;增加登录音乐;掉落武将经验改无限

---
 Main/ResModule/ResManager.cs |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/Main/ResModule/ResManager.cs b/Main/ResModule/ResManager.cs
index 27e2bac..48f61f6 100644
--- a/Main/ResModule/ResManager.cs
+++ b/Main/ResModule/ResManager.cs
@@ -70,7 +70,7 @@
         {typeof(Sprite), "png"},
         {typeof(Texture2D), "jpg"},
         {typeof(Texture), "jpg"},
-        { typeof(Shader), "shader"},
+        {typeof(Shader), "shader"},
         {typeof(TextAsset), "txt"},
         {typeof(AudioClip), "wav"},
         {typeof(Font), "ttf"},
@@ -126,8 +126,11 @@
     }
 #endif
 
-    public T LoadAsset<T> (string directory, string name, bool needExt = true) where T : UnityEngine.Object
+    //needExt 鏄惁闇�瑕佸嚱鏁板唴閮ㄦ坊鍔犲悗缂�
+    public T LoadAsset<T>(string directory, string name, bool needExt = true) where T : UnityEngine.Object
     {
+        directory = directory.Replace("\\", "/");
+        name = name.Replace("\\", "/");
         T asset = null;
         //  鐗规畩澶勭悊 鍥犱负鏈変竴灞傚浘闆嗙殑鍏崇郴 directory瑕佷紶鍏ョ殑搴旇鏄痑tlas鐨勫悕瀛�
         if (typeof(T) == typeof(Sprite))
@@ -143,12 +146,12 @@
                 name = name.Substring(name.LastIndexOf("/") + 1);
             }
 
-            directory = directory.Replace("\\", "/");
         }
 
         return LoadAssetInternal<T>(directory, name, needExt);
     }
 
+    //needExt 鏄惁闇�瑕佸嚱鏁板唴閮ㄦ坊鍔犲悗缂�
     private T LoadAssetInternal<T>(string directory, string name, bool needExt = true) where T : UnityEngine.Object
     {
         T asset = null;
@@ -167,7 +170,7 @@
                 //澶栭儴鐢ㄥ埌鐨勮嚜宸卞姞鍚庣紑锛屽唴閮ㄧ粺涓�鍘婚櫎鍚庣紑鍚�
                 name = name.Substring(0, name.LastIndexOf("."));
             }
-
+            //TODO: 涓存椂鐗规畩澶勭悊鎵撳寘鍚庣殑璺緞璇诲彇
             if (directory == "UI" || directory == "UIComp" || directory.StartsWith("Sprite")
             || directory == "Battle/Prefabs" || directory == "Materials")
             {
@@ -181,6 +184,10 @@
             else if (directory.Contains("Texture"))
             {
                 directory = "maps/" + name;
+            }
+            else if (directory.Contains("Shader"))
+            {
+                directory = "graphic/shader";
             }
 
 
@@ -228,8 +235,12 @@
             return LoadAssetInternal<Sprite>(atlasName, spriteName);
     }
 
+    //needExt 鏄惁闇�瑕佸嚱鏁板唴閮ㄦ坊鍔犲悗缂�
     public void LoadAssetAsync<T>(string directory, string name, Action<bool, UnityEngine.Object> callBack, bool needExt = true) where T : UnityEngine.Object
     {
+        directory = directory.Replace("\\", "/");
+        name = name.Replace("\\", "/");
+
         //  鐗规畩澶勭悊 鍥犱负鏈変竴灞傚浘闆嗙殑鍏崇郴 directory瑕佷紶鍏ョ殑搴旇鏄痑tlas鐨勫悕瀛�
         if (typeof(T) == typeof(Sprite))
         {

--
Gitblit v1.8.0