|
|
@@ -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 ();
|
|
|
}
|
|
|
}
|