提交 3650615d 编写于 作者: T tanghai

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

上级 fde616a6
......@@ -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 ();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册