private static void ApplyFixed(string overridefixedLogPath) { string fileText = string.Empty; string reladyPath = "FixedFillPathInfo.txt"; if (!string.IsNullOrEmpty(overridefixedLogPath)) { reladyPath = overridefixedLogPath; } if (needtoFixDll) { Debug.Log("正在修复DLL"); ComponentUtily.ReimportUI(); AssetBundleManagerEditor.SaveAndRefershAssets(); } fileText = "needToFixDll:" + needtoFixDll + "\r\n"; foreach (FixedPathNode str in needToFixedFilePath) { fileText += "FixedFileInfo:" + str.getDesc() + "\r\n"; Debug.Log("资源导入时发生错误,正在重新导入:" + str.FixedPath); AssetDatabase.ImportAsset(str.FixedPath, ImportAssetOptions.ForceUpdate); } File.WriteAllText(reladyPath, fileText); if (needToFixedFilePath.Count > 0) { Debug.Log("资源重新导入完成.."); } AssetBundleManagerEditor.SaveAndRefershAssets(); }
public static bool DoImporterFixed(string CopyeditorLogPath = null, string fixedLogPath = null) { needToFixedFilePath.Clear(); GenerateErrorFile(CopyeditorLogPath); ApplyFixed(fixedLogPath); AssetBundleManagerEditor.SaveAndRefershAssets(); return(needToFixedFilePath.Count > 0); }