From 37621ba044af65d3d5f11b0b8b50d544dbf8552f Mon Sep 17 00:00:00 2001 From: cehua-TT <448191260@qq.com> Date: 星期四, 25 十月 2018 15:15:06 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_client --- Assets/Editor/Tool/TableTool.cs | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Assets/Editor/Tool/TableTool.cs b/Assets/Editor/Tool/TableTool.cs index 10249ea..362db29 100644 --- a/Assets/Editor/Tool/TableTool.cs +++ b/Assets/Editor/Tool/TableTool.cs @@ -178,15 +178,19 @@ MessageBox.Show("瀵煎嚭鎴愬姛锛�"); } - public static void ReadAllTxtToBytes(string _outPath) + public static void CopyConfigsToOutPutPath(string _outPath) { configOutPutPath = _outPath; - var rootPath = UnityEngine.Application.dataPath + "/ResourcesOut/Refdata/Config"; - var configFiles = FileExtersion.GetFileInfos(rootPath, new string[] { "*.txt", "*.TXT" }); + var root1 = UnityEngine.Application.dataPath + "/ResourcesOut/Refdata/Config"; + var configFiles = new List<FileInfo>(); + configFiles.AddRange(FileExtersion.GetFileInfos(root1, new string[] { "*.txt", "*.TXT" })); + var root2 = UnityEngine.Application.dataPath + "/Resources/Config"; + configFiles.AddRange(FileExtersion.GetFileInfos(root1, new string[] { "*.txt", "*.TXT" })); + foreach (var file in configFiles) { - var fileInfo = new System.IO.FileInfo(file.FullName); - ReadTxtToBytes(fileInfo); + var fileInfo = new FileInfo(file.FullName); + CopyTxt(fileInfo); } } @@ -211,11 +215,11 @@ { continue; } - ReadTxtToBytes(_tableNameLst[i].fileInfo); + CopyTxt(_tableNameLst[i].fileInfo); } } - private static void ReadTxtToBytes(FileInfo fileInfo) + private static void CopyTxt(FileInfo fileInfo) { string fileName = fileInfo.Name.Split('.')[0]; @@ -230,7 +234,7 @@ File.Delete(filePath); } - File.Copy(fileInfo.FullName,filePath); + File.Copy(fileInfo.FullName, filePath); } /// <summary> -- Gitblit v1.8.0