From f736485f1337e64475d54352fccc460b817c1441 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期六, 11 五月 2024 16:32:05 +0800 Subject: [PATCH] 0312 加密处理 --- Assets/Editor/Tool/TableTool.cs | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Assets/Editor/Tool/TableTool.cs b/Assets/Editor/Tool/TableTool.cs index 6405e50..675b7ed 100644 --- a/Assets/Editor/Tool/TableTool.cs +++ b/Assets/Editor/Tool/TableTool.cs @@ -1,6 +1,7 @@ 锘縰sing System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text; using System.Windows.Forms; using UnityEditor; @@ -249,13 +250,32 @@ Directory.CreateDirectory(configOutPutPath); } - string filePath = configOutPutPath + "/" + fileName + ".txt"; + string filePath = configOutPutPath + "/" + AssetVersionUtility.EncodeFileName(fileName) + ".txt"; if (File.Exists(filePath)) { File.Delete(filePath); } - File.Copy(fileInfo.FullName, filePath); + if (fileName.Contains("MapData_")) + { + File.Copy(fileInfo.FullName, filePath); + } + else + { + //鎸夎璇诲彇鏂囦欢锛屽苟灏嗘瘡琛屽唴瀹瑰�掑簭鍐欏叆鏂版枃浠� + using (StreamReader sr = new StreamReader(fileInfo.FullName, Encoding.Default)) + { + using (StreamWriter sw = new StreamWriter(filePath, false, Encoding.Default)) + { + string line; + while ((line = sr.ReadLine()) != null) + { + sw.WriteLine(new string(line.Reverse().ToArray())); + } + } + } + + } } /// <summary> -- Gitblit v1.8.0