static void HandleLuaFile() {
string resPath = AppDataPath + "/StreamingAssets/";
string luaPath = resPath + "/lua/";
//----------复制Lua文件----------------
if (!Directory.Exists(luaPath)) {
Directory.CreateDirectory(luaPath);
}
string[] luaPaths = { QPath.LuaSrcPath,
QPath.ToLuaFilePath };
for (int i = 0; i < luaPaths.Length; i++) {
paths.Clear(); files.Clear();
string luaDataPath = luaPaths[i].ToLower();
Recursive(luaDataPath);
int n = 0;
foreach (string f in files) {
if (f.EndsWith(".meta")) continue;
string newfile = f.Replace(luaDataPath, "");
string newpath = luaPath + newfile;
string path = Path.GetDirectoryName(newpath);
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
if (File.Exists(newpath)) {
File.Delete(newpath);
}
if (QAppConst.LuaByteMode) {
EncodeLuaFile(f, newpath);
} else {
File.Copy(f, newpath, true);
}
UpdateProgress(n++, files.Count, newpath);
}
}
EditorUtility.ClearProgressBar();
AssetDatabase.Refresh();
}