Branch_oumei
zhangjiannan 2025-03-26 19:44:02 +08:00
parent d7940bf6f0
commit c6350fc581
1 changed files with 4 additions and 3 deletions

View File

@ -28,6 +28,7 @@ public class MoveFile
string forlder = newPath.Substring(0, newPath.LastIndexOf("/"));
Directory.CreateDirectory(forlder);
//Debug.Log(newPath);
AssetDatabase.DeleteAsset(forlder + "/" + splits[splits.Length - 1]);
AssetDatabase.MoveAsset(path, forlder + "/" + splits[splits.Length - 1]);
}
else
@ -61,9 +62,9 @@ public class MoveFile
if (zhresults.Length > 0)
{
string oldPath = AssetDatabase.GUIDToAssetPath(zhresults[0]);
string newPath = oldPath.Replace("ArtFont_zh", "ArtFont_temp");
string forlder = newPath.Substring(0, newPath.LastIndexOf("/"));
Directory.CreateDirectory(forlder);
string newPath = "Assets/tempatlas";
Directory.CreateDirectory(newPath);
newPath = newPath + "/" + oldPath.Substring(oldPath.LastIndexOf('/'));
AssetDatabase.CopyAsset(oldPath, newPath);
}
}