【热更工具】提交热更文件到git时,如果目录不存在则创建

dev_chengFeng
gaoxin 2021-07-22 19:37:06 +08:00
parent a228c18c50
commit 1d49490fe3
1 changed files with 6 additions and 0 deletions

View File

@ -613,6 +613,12 @@ namespace GameEditor.FrameTool
foreach (ResourceFile rf in updateList)
{
EditorUtility.DisplayProgressBar("正在复制文件:" + toPath, rf.fileName, (float)i/updateList.Count);
string dirName = Path.GetDirectoryName(toPath + rf.fileName);
if (!Directory.Exists(dirName))
{
Directory.CreateDirectory(dirName);
}
File.Copy(fromPath + rf.fileName, toPath + rf.fileName, true);
log.Add(rf.fileName);
}