|
|
@@ -173,7 +173,7 @@ return aaa";
|
|
|
|
|
|
if (GUILayout.Button("复制luacfg文件"))
|
|
|
{
|
|
|
- CopyFleByLuaCfg("Assets\\Editor\\CsvToLua\\LuaCfg.lua","", "D:/项目/图/仙境/cn/","_cn");
|
|
|
+ CopyFleByLuaCfg("Assets\\Editor\\CsvToLua\\luaCopyFileCfg.lua", "", "D:/项目/图/仙境/cn/","_cn");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -737,22 +737,49 @@ return aaa";
|
|
|
LuaFunction SetOutput_fun = luaTable.GetLuaFunction("SetOutput");
|
|
|
LuaFunction GetNextCfg_fun = luaTable.GetLuaFunction("GetNextCfg");
|
|
|
LuaFunction GetLen_fun = luaTable.GetLuaFunction("GetLen");
|
|
|
- int len = GetLen_fun.Invoke<int>();
|
|
|
- int curindex = 1;
|
|
|
+
|
|
|
init_fun.Call<LuaTable>(luaTable);
|
|
|
SetOutput_fun.Call<LuaTable, string>(luaTable, output);
|
|
|
+ int len = GetLen_fun.Invoke<LuaTable,int>(luaTable);
|
|
|
+ int curindex = 1;
|
|
|
EditorUtility.DisplayProgressBar("复制中", $"开始复制", 0);
|
|
|
+ string metastr = ".meta";
|
|
|
while (true)
|
|
|
{
|
|
|
EditorUtility.DisplayProgressBar("复制中", $"复制{curindex}/{len}", curindex/len);
|
|
|
- LuaTable cfg = GetNextCfg_fun.Invoke<LuaTable>();
|
|
|
+ LuaTable cfg = GetNextCfg_fun.Invoke<LuaTable, LuaTable>(luaTable);
|
|
|
//{result = false,path = path,outputPath = outputPath}
|
|
|
bool result = cfg.RawGet<string, bool>("result");
|
|
|
if (result)
|
|
|
{
|
|
|
string path = cfg.RawGet<string, string>("path");
|
|
|
string _outputPath = cfg.RawGet<string, string>("outputPath");
|
|
|
- File.Copy(fileRootPath+path,outputPath+_outputPath,true);
|
|
|
+ string filePath = fileRootPath + path;
|
|
|
+ string fileOutputPath = outputPath + _outputPath;
|
|
|
+
|
|
|
+ if (path.Contains(".psd"))
|
|
|
+ {
|
|
|
+ Debug.Log($"不复制psd文件:[{path}]");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ FileHelper.CreateDir(FileHelper.PathRemoveBack(fileOutputPath));
|
|
|
+ if (File.Exists(filePath))
|
|
|
+ {
|
|
|
+ File.Copy(filePath, fileOutputPath, true);
|
|
|
+
|
|
|
+ if (!path.Contains(metastr))
|
|
|
+ {
|
|
|
+ File.Copy(filePath+ metastr, fileOutputPath+ metastr, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Debug.Log($"不存在文件:[{filePath}]");
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|