Преглед изворни кода

现在只需要复制Unity编译的Hotfix dll就行了

tanghai пре 7 година
родитељ
комит
3650615d0c
1 измењених фајлова са 1 додато и 40 уклоњено
  1. 1 40
      Unity/Assets/Editor/BuildEditor/BuildHotfixEditor.cs

+ 1 - 40
Unity/Assets/Editor/BuildEditor/BuildHotfixEditor.cs

@@ -15,48 +15,9 @@ namespace ETEditor
 
         static Startup()
         {
-            
-#if ILRuntime
-            // Copy最新的pdb文件
-            string[] dirs = 
-            {
-                "./Temp/UnityVS_bin/Debug", 
-                "./Temp/UnityVS_bin/Release", 
-                "./Temp/bin/Debug", 
-                "./Temp/bin/Release"
-            };
-
-            DateTime dateTime = DateTime.MinValue;
-            string newestDir = "";
-            foreach (string dir in dirs)
-            {
-                string dllPath = Path.Combine(dir, HotfixDll);
-                if (!File.Exists(dllPath))
-                {
-                    continue;
-                }
-                FileInfo fi = new FileInfo(dllPath);
-                DateTime lastWriteTimeUtc = fi.LastWriteTimeUtc;
-                if (lastWriteTimeUtc > dateTime)
-                {
-                    newestDir = dir;
-                    dateTime = lastWriteTimeUtc;
-                }
-            }
-            
-            if (newestDir != "")
-            {
-                File.Copy(Path.Combine(newestDir, HotfixDll), Path.Combine(CodeDir, "Hotfix.dll.bytes"), true);
-                File.Copy(Path.Combine(newestDir, HotfixPdb), Path.Combine(CodeDir, "Hotfix.pdb.bytes"), true);
-                Log.Info($"ilrt 复制Hotfix.dll, Hotfix.pdb到Res/Code完成");
-            }
-#else
             File.Copy(Path.Combine(ScriptAssembliesDir, HotfixDll), Path.Combine(CodeDir, "Hotfix.dll.bytes"), true);
             File.Copy(Path.Combine(ScriptAssembliesDir, HotfixPdb), Path.Combine(CodeDir, "Hotfix.pdb.bytes"), true);
-            Log.Info($"mono 复制Hotfix.dll, Hotfix.pdb到Res/Code完成");
-#endif
-
-            
+            Log.Info($"复制Hotfix.dll, Hotfix.pdb到Res/Code完成");
             AssetDatabase.Refresh ();
         }
     }