From 5a4e34c8a85737c0fa5b5775122da31155cbaef3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 09 二月 2026 14:46:01 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/AssetVersion/AssetVersionUtility.cs |   50 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/Main/System/AssetVersion/AssetVersionUtility.cs b/Main/System/AssetVersion/AssetVersionUtility.cs
index b67aa6c..cb0faa2 100644
--- a/Main/System/AssetVersion/AssetVersionUtility.cs
+++ b/Main/System/AssetVersion/AssetVersionUtility.cs
@@ -56,7 +56,7 @@
 
     public static DateTime assetsBuildTime = DateTime.MinValue;
 
-    static Dictionary<string, AssetVersion> assetVersions = new Dictionary<string, AssetVersion>();
+    public static Dictionary<string, AssetVersion> assetVersions = new Dictionary<string, AssetVersion>();
     //鏈湴LogicBytes鏂囦欢鍜� assetVersions 姣旇緝鏄惁闇�瑕佷笅杞�
     static Dictionary<string, AssetVersion> localAssetVersions = new Dictionary<string, AssetVersion>();
     static List<AssetVersion> priorDownLoadAssetVersions = new List<AssetVersion>();
@@ -68,12 +68,11 @@
 
     }
 
-    public static void OnDownLoadPriorBundle(DownloadTask task)
+    public static void OnDownLoadPriorBundle(DownloadHotTask task)
     {
         if (task.IsDone)
         {
-            //  TODO YYL
-            // PriorBundleConfig.Init(true);
+            PriorBundleConfig.LazyInit();
             GetAssetVersionFile();
         }
         else
@@ -84,11 +83,24 @@
         }
     }
 
+    public static void OnDownLoadOPConfig(DownloadHotTask task)
+    {
+        if (task.IsDone)
+        {
+            OPConfigConfig.LazyInit();
+        }
+        else
+        {
+            //涓�鐩村皾璇曚笅杞�
+            task.BeginDownload(OnDownLoadOPConfig);
+            Debug.Log("OnDownLoadOPConfig fail - before AssetVersion");
+        }
+    }
     public static void GetAssetVersionFile()
     {
         checkAssetCompleted = false;
         Debug.LogFormat("寮�濮嬭幏鍙栬祫婧愮増鏈枃浠讹細鏃堕棿 {0}", DateTime.Now);
-        var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt");
+        var assetVersionUrl = StringUtility.Concat(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt");
         assetVerUrl = assetVersionUrl;
         Debug.Log("http鍦板潃:assetVersionUrl  " + assetVersionUrl);
         HttpRequest.Instance.UnityWebRequestGet(assetVersionUrl, 5, OnGetAssetVersionFile);
@@ -166,7 +178,7 @@
         if (_prior)
         {
             m_PriorAssetDownLoadDone = false;
-            DownLoadAndDiscompressTask.Instance.Prepare(priorDownLoadAssetVersions, () => { m_PriorAssetDownLoadDone = true; });
+            DownLoadAndDiscompressHotTask.Instance.Prepare(priorDownLoadAssetVersions, () => { m_PriorAssetDownLoadDone = true; });
         }
         else
         {
@@ -259,7 +271,7 @@
         //     return false;
         // }
 
-        // if (!IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower())))
+        // if (!IsAssetValid(StringUtility.Concat("maps/", mapResConfig.MapResources.ToLower())))
         // {
         //     return false;
         // }
@@ -280,8 +292,8 @@
         //             var npcConfig = NPCConfig.Get(item);
         //             if (npcConfig != null)
         //             {
-        //                 var assetbundleName = StringUtility.Contact("prefab_race_", npcConfig.MODE.ToLower());
-        //                 if (!IsAssetValid(StringUtility.Contact("gmodels/", assetbundleName)))
+        //                 var assetbundleName = StringUtility.Concat("prefab_race_", npcConfig.MODE.ToLower());
+        //                 if (!IsAssetValid(StringUtility.Concat("gmodels/", assetbundleName)))
         //                 {
         //                     return false;
         //                 }
@@ -307,26 +319,26 @@
         //    {
         //        headString = name.Substring(0, index);
         //        name = name.Substring(index + 1);
-        //        return StringUtility.Contact(headString, "/", new string(name.Reverse().ToArray()), "_aop");
+        //        return StringUtility.Concat(headString, "/", new string(name.Reverse().ToArray()), "_aop");
         //    }
         //    else
         //    {
         //        headString = name.Substring(0, index);
         //        var ext = name.Substring(dotLastIndex);
         //        name = name.Substring(index + 1, dotLastIndex - index - 1);
-        //        return StringUtility.Contact(headString, "/", new string(name.Reverse().ToArray()), "_aop", ext);
+        //        return StringUtility.Concat(headString, "/", new string(name.Reverse().ToArray()), "_aop", ext);
         //    }
         //}
         //else
         //{
         //    int dotLastIndex = name.LastIndexOf(".");
         //    if (dotLastIndex == -1)
-        //        return StringUtility.Contact(new string(name.Reverse().ToArray()), "_aop");
+        //        return StringUtility.Concat(new string(name.Reverse().ToArray()), "_aop");
         //    else
         //    {
         //        var ext = name.Substring(dotLastIndex);
         //        name = name.Substring(0, dotLastIndex);
-        //        return StringUtility.Contact(new string(name.Reverse().ToArray()), "_aop", ext);
+        //        return StringUtility.Concat(new string(name.Reverse().ToArray()), "_aop", ext);
         //    }
         //}
 
@@ -345,14 +357,14 @@
         //    {
         //        headString = name.Substring(0, index);
         //        name = name.Substring(index + 1);
-        //        return StringUtility.Contact(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()));
+        //        return StringUtility.Concat(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()));
         //    }
         //    else
         //    {
         //        headString = name.Substring(0, index);
         //        var ext = name.Substring(dotLastIndex);
         //        name = name.Substring(index + 1, dotLastIndex - index - 1);
-        //        return StringUtility.Contact(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()), ext);
+        //        return StringUtility.Concat(headString, "/", new string(name.Replace("_aop", "").Reverse().ToArray()), ext);
         //    }
         //}
         //else
@@ -374,10 +386,10 @@
     {
         if (reverse)
             _assetKey = EncodeFileName(_assetKey);
-        var path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey);
+        var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, _assetKey);
         if (!File.Exists(path))
         {
-            path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
+            path = StringUtility.Concat(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
         }
 
         return path;
@@ -387,10 +399,10 @@
     {
         if (reverse)
             _assetKey = EncodeFileName(_assetKey);
-        var path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey);
+        var path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, _assetKey);
         if (!File.Exists(path))
         {
-            path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
+            path = StringUtility.Concat(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
         }
 
         return path;

--
Gitblit v1.8.0