From 81312e057b1803fee4042dacc79bbddc7da7fd79 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 17 五月 2024 14:54:02 +0800
Subject: [PATCH] 0312 资源不混淆,还原

---
 System/AssetVersion/AssetVersionUtility.cs |  135 ++++++++++++++++++++++----------------------
 1 files changed, 68 insertions(+), 67 deletions(-)

diff --git a/System/AssetVersion/AssetVersionUtility.cs b/System/AssetVersion/AssetVersionUtility.cs
index fa8ae1f..f28c925 100644
--- a/System/AssetVersion/AssetVersionUtility.cs
+++ b/System/AssetVersion/AssetVersionUtility.cs
@@ -6,7 +6,6 @@
 using vnxbqy.UI;
 using System.Threading;
 using System.Linq;
-using UnityEditor;
 
 public class AssetVersionUtility
 {
@@ -87,7 +86,7 @@
     {
         checkAssetCompleted = false;
         Debug.LogFormat("寮�濮嬭幏鍙栬祫婧愮増鏈枃浠讹細鏃堕棿 {0}", DateTime.Now);
-        var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AVersion.txt");
+        var assetVersionUrl = StringUtility.Contact(VersionUtility.Instance.versionInfo.GetResourcesURL(VersionConfig.Get().branch), Language.fixPath, "/AssetsVersion.txt");
         assetVerUrl = assetVersionUrl;
         Debug.Log("http鍦板潃:assetVersionUrl  " + assetVersionUrl);
         HttpRequest.Instance.RequestHttpGet(assetVersionUrl, HttpRequest.defaultHttpContentType, 3, OnGetAssetVersionFile);
@@ -193,7 +192,7 @@
 
     static void InitPackageVersionInfo()
     {
-        var text = Resources.Load<TextAsset>("AVersionCmp");
+        var text = Resources.Load<TextAsset>("AssetsVersionCmp");
         if (text != null)
         {
             var lines = text.text.Split(new string[] { FileExtersion.lineSplit }, StringSplitOptions.RemoveEmptyEntries);
@@ -290,75 +289,77 @@
     //灏嗘枃浠跺悕鍊掑簭锛屽姞涓奯aop鍚庣紑
     public static string EncodeFileName(string name)
     {
-        name = name.Replace("\\", "/");
-        int index = name.LastIndexOf("/");
-        string headString;
-        if (index >= 0)
-        {
-            int dotLastIndex = name.LastIndexOf(".");
-            if (dotLastIndex == -1)
-            {
-                headString = name.Substring(0, index);
-                name = name.Substring(index + 1);
-                return StringUtility.Contact(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);
-            }
-        }
-        else
-        {
-            int dotLastIndex = name.LastIndexOf(".");
-            if (dotLastIndex == -1)
-                return StringUtility.Contact(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 name;
+        //name = name.Replace("\\", "/");
+        //int index = name.LastIndexOf("/");
+        //string headString;
+        //if (index >= 0)
+        //{
+        //    int dotLastIndex = name.LastIndexOf(".");
+        //    if (dotLastIndex == -1)
+        //    {
+        //        headString = name.Substring(0, index);
+        //        name = name.Substring(index + 1);
+        //        return StringUtility.Contact(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);
+        //    }
+        //}
+        //else
+        //{
+        //    int dotLastIndex = name.LastIndexOf(".");
+        //    if (dotLastIndex == -1)
+        //        return StringUtility.Contact(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);
+        //    }
+        //}
 
     }
 
     public static string DecodeFileName(string name)
     {
-        name = name.Replace("\\", "/");
-        int index = name.LastIndexOf("/");
-        string headString;
-        if (index >= 0)
-        {
-            int dotLastIndex = name.LastIndexOf(".");
-            if (dotLastIndex == -1)
-            {
-                headString = name.Substring(0, index);
-                name = name.Substring(index + 1);
-                return StringUtility.Contact(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);
-            }
-        }
-        else
-        {
-            int dotLastIndex = name.LastIndexOf(".");
-            if (dotLastIndex == -1)
-                return new string(name.Replace("_aop", "").Reverse().ToArray());
-            else
-            {
-                var ext = name.Substring(dotLastIndex);
-                name = name.Substring(0, dotLastIndex);
-                return new string(name.Replace("_aop", "").Reverse().ToArray()) + ext;
-            }
-        }
+        return name;
+        //name = name.Replace("\\", "/");
+        //int index = name.LastIndexOf("/");
+        //string headString;
+        //if (index >= 0)
+        //{
+        //    int dotLastIndex = name.LastIndexOf(".");
+        //    if (dotLastIndex == -1)
+        //    {
+        //        headString = name.Substring(0, index);
+        //        name = name.Substring(index + 1);
+        //        return StringUtility.Contact(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);
+        //    }
+        //}
+        //else
+        //{
+        //    int dotLastIndex = name.LastIndexOf(".");
+        //    if (dotLastIndex == -1)
+        //        return new string(name.Replace("_aop", "").Reverse().ToArray());
+        //    else
+        //    {
+        //        var ext = name.Substring(dotLastIndex);
+        //        name = name.Substring(0, dotLastIndex);
+        //        return new string(name.Replace("_aop", "").Reverse().ToArray()) + ext;
+        //    }
+        //}
     }
 
 

--
Gitblit v1.8.0