资源导入工具修改提交
parent
d25b80dd1b
commit
b36edb9ae9
|
@ -143,20 +143,22 @@ namespace GameEditor.Util
|
|||
string[] files = Directory.GetFiles(desPath);
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
string sourceExt = Path.GetExtension(files[i]);
|
||||
if (sourceExt == ".meta")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string fileName = Path.GetFileName(files[i]);
|
||||
string sourceFileName = Path.GetFileNameWithoutExtension(files[i]);
|
||||
if (sourceFileName.EndsWith("_zh"))
|
||||
{
|
||||
sourceFileName = sourceFileName.Substring(0, sourceFileName.Length - 3);
|
||||
}
|
||||
string sourceExt = Path.GetExtension(files[i]);
|
||||
|
||||
string[] guids = AssetDatabase.FindAssets(sourceFileName + " t:Texture",new string[] { tag1 });
|
||||
if (guids == null || guids.Length < 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bool isReplace = false;
|
||||
if (guids != null && guids.Length > 0)
|
||||
{
|
||||
for (int j = 0; j < guids.Length; j++)
|
||||
{
|
||||
string desFilePath = AssetDatabase.GUIDToAssetPath(guids[j]);
|
||||
|
@ -182,6 +184,8 @@ namespace GameEditor.Util
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isReplace)
|
||||
{
|
||||
AssetDatabase.MoveAsset("Assets/ImportFloder/" + fileName, Path.Combine(tag1, path) + "/" + fileName);
|
||||
|
|
Loading…
Reference in New Issue