Przeglądaj źródła

ClientServer模式下要导出服务端Excel给客户端使用

tanghai 3 lat temu
rodzic
commit
3dfb243e1c

+ 3 - 1
DotNet/Tool/ExcelExporter/ExcelExporter.cs

@@ -111,7 +111,9 @@ namespace ET
                     Directory.Delete(ServerClassDir, true);
                 }
 
-                foreach (string path in Directory.GetFiles(excelDir))
+                List<string> files = new List<string>();
+                FileHelper.GetAllFiles(files, excelDir);
+                foreach (string path in files)
                 {
                     string fileName = Path.GetFileName(path);
                     if (!fileName.EndsWith(".xlsx") || fileName.StartsWith("~$") || fileName.Contains("#"))

BIN
Excel/StartMachineConfig@s.xlsx


BIN
Excel/StartProcessConfig@s.xlsx


BIN
Excel/StartSceneConfig@s.xlsx


BIN
Excel/StartZoneConfig@s.xlsx


+ 0 - 3
Excel/win_startExcelExport.bat

@@ -1,3 +0,0 @@
-cd /d ../Bin
-dotnet Tool.dll --AppType=ExcelExporter
-pause

+ 0 - 3
Proto/win_startProtoExport.bat

@@ -1,3 +0,0 @@
-cd /d ../Bin
-dotnet Tool.dll --AppType=Proto2CS
-pause

+ 8 - 0
Unity/Assets/Bundles/Config/Recast.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: de18224812089e643a49233c8ab9e839
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 0 - 0
Config/StartMachineConfigCategory.bytes → Unity/Assets/Bundles/Config/StartConfig/Localhost/StartMachineConfigCategory.bytes


+ 0 - 0
Config/StartProcessConfigCategory.bytes → Unity/Assets/Bundles/Config/StartConfig/Localhost/StartProcessConfigCategory.bytes


+ 0 - 0
Config/StartSceneConfigCategory.bytes → Unity/Assets/Bundles/Config/StartConfig/Localhost/StartSceneConfigCategory.bytes


+ 0 - 0
Config/StartZoneConfigCategory.bytes → Unity/Assets/Bundles/Config/StartConfig/Localhost/StartZoneConfigCategory.bytes


+ 3 - 3
Unity/Assets/Bundles/Config/UnitConfigCategory.bytes

@@ -1,4 +1,4 @@
 
-/é	米克尔"带有强力攻击技能(0²
-1ê
-米克尔2"带有强力攻击技能2(0–
+1é	米克尔"带有强力攻击技能(0²8D
+3ê
+米克尔2"带有强力攻击技能2(0–8N

+ 0 - 24
Unity/Assets/Scripts/Core/Helper/FileHelper.cs

@@ -92,29 +92,5 @@ namespace ET
 				}
 			}
 		}
-		
-		public static bool CopyFile(string sourcePath, string targetPath, bool overwrite)
-		{
-			string sourceText = null;
-			string targetText = null;
-
-			if (File.Exists(sourcePath))
-			{
-				sourceText = File.ReadAllText(sourcePath);
-			}
-
-			if (File.Exists(targetPath))
-			{
-				targetText = File.ReadAllText(targetPath);
-			}
-
-			if (sourceText != targetText && File.Exists(sourcePath))
-			{
-				File.Copy(sourcePath, targetPath, overwrite);
-				return true;
-			}
-
-			return false;
-		}
 	}
 }

+ 10 - 0
Unity/Assets/Scripts/Editor/BuildEditor/BuildEditor.cs

@@ -6,6 +6,7 @@ using System.Linq;
 using UnityEditor;
 using UnityEditor.Compilation;
 using UnityEngine;
+using Debug = UnityEngine.Debug;
 using Object = UnityEngine.Object;
 
 namespace ET
@@ -135,6 +136,15 @@ namespace ET
 			if (GUILayout.Button("ExcelExporter"))
 			{
 				ToolsEditor.ExcelExporter();
+				if (this.globalConfig.CodeMode == CodeMode.ClientServer)
+				{
+					FileHelper.CopyDirectory("../Config/StartConfig/Localhost", "Assets/Bundles/Config/StartConfig/Localhost");
+					foreach (string file in Directory.GetFiles("../Config/", "*.bytes"))
+					{
+						File.Copy(file, $"Assets/Bundles/Config/{Path.GetFileName(file)}", true);
+					}
+				}
+				Debug.Log("copy config to Assets/Bundles/Config");
 			}
 			
 			if (GUILayout.Button("Proto2CS"))