diff --git a/Assets/Scripts/Editor/GameEditor/ResourcesPath/ResourcesPathEditor.cs b/Assets/Scripts/Editor/GameEditor/ResourcesPath/ResourcesPathEditor.cs index 9df18baf57..0d99ace365 100644 --- a/Assets/Scripts/Editor/GameEditor/ResourcesPath/ResourcesPathEditor.cs +++ b/Assets/Scripts/Editor/GameEditor/ResourcesPath/ResourcesPathEditor.cs @@ -264,22 +264,22 @@ namespace GameEditor if (resPaths.ContainsKey (fileName)) { var info = resPaths[fileName]; string oldPath = string.Format("{0}/{1}{2}", dirPaths[info.resPathIndex], info.resName, info.extension); - Debug.LogErrorFormat("资源名重复:{0}=>{1}", path, oldPath); - string exName = Path.GetExtension(path).Replace(".", ""); - if (!string.IsNullOrEmpty(exName)) //给资源文件加后缀名规避重复 - { - if (exName != "prefab")//避免给prefab文件更名 - { - string newPath = AssetDatabase.RenameAsset(path, Path.GetFileNameWithoutExtension(path) + "_" + exName); - Debug.LogErrorFormat("资源名已修正:{0} 请再次刷新文件路径", path); - } - else - { - string newPath = AssetDatabase.RenameAsset(oldPath, Path.GetFileNameWithoutExtension(oldPath) - + "_" + Path.GetExtension(oldPath).Replace(".", "")); - Debug.LogErrorFormat("资源名已修正:{0} 请再次刷新文件路径", oldPath); - } - } + Debug.LogErrorFormat("资源名重复:{0}\n原有资源:{2}\n重复资源:{1}", info.resName, path, oldPath); + //string exName = Path.GetExtension(path).Replace(".", ""); + //if (!string.IsNullOrEmpty(exName)) //给资源文件加后缀名规避重复 + //{ + // if (exName != "prefab")//避免给prefab文件更名 + // { + // string newPath = AssetDatabase.RenameAsset(path, Path.GetFileNameWithoutExtension(path) + "_" + exName); + // Debug.LogErrorFormat("资源名已修正:{0} 请再次刷新文件路径", path); + // } + // else + // { + // string newPath = AssetDatabase.RenameAsset(oldPath, Path.GetFileNameWithoutExtension(oldPath) + // + "_" + Path.GetExtension(oldPath).Replace(".", "")); + // Debug.LogErrorFormat("资源名已修正:{0} 请再次刷新文件路径", oldPath); + // } + //} } else {