public REFERENCE_ANALYSE_ERROR_TYPE AnalyseNoneDependency(out NoneDependencyInfo noneDependencyInfo) { REFERENCE_ANALYSE_ERROR_TYPE errorType = REFERENCE_ANALYSE_ERROR_TYPE.REFERENCE_ANALYSE_ERROR_NONE; noneDependencyInfo = new NoneDependencyInfo(); do { errorType = CheckNoneDependencyInput(); if (IsAnalserFailed(errorType)) { break; } string configDir = UIAtlasEditorConfig.ReferenceResultPath; AtlasReferenceFilter filter = new AtlasReferenceFilter(configDir); AnnalyseReferenceProgresser.GetInstance().InitProgresser(m_inputInfo.ProjectTbl.Count, "无引用导出中"); int count = 1; foreach (var item in m_inputInfo.ProjectTbl) { if (filter.CheckNoneDependencyAtlasFilter(item.Path)) { continue; } SpriteNoneRefInfo spriteInfo = new SpriteNoneRefInfo(); List <AtlasSpriteImage> spriteTbl = item.GetAllSprites(); foreach (var spriteItem in spriteTbl) { string spriteName = Path.GetFileNameWithoutExtension(spriteItem.Path); if (filter.CheckNoneDependencySpriteFilter(item.Path, spriteName)) { continue; } if (spriteItem.ReferenceTable.Count == 0) { spriteInfo.NoneUseSpriteTbl.Add(spriteName); } } if (spriteInfo.NoneUseSpriteTbl.Count == spriteTbl.Count) { spriteInfo.IsAllUnUse = true; } noneDependencyInfo.NoneDependencyInfoTbl.Add(item.Path, spriteInfo); AnnalyseReferenceProgresser.GetInstance().UpdateProgress(count++); } }while(false); return(errorType); }
public static void DestoryInstance() { if (m_Instance != null) { m_Instance = null; AnnalyseReferenceProgresser.DestoryInstance(); } }
public static AnnalyseReferenceProgresser GetInstance() { if (m_Instance == null) { m_Instance = new AnnalyseReferenceProgresser(); } return(m_Instance); }
public REFERENCE_ANALYSE_ERROR_TYPE AnalyseDependency(out DependencyInfo dependencyInfo) { REFERENCE_ANALYSE_ERROR_TYPE errorType = REFERENCE_ANALYSE_ERROR_TYPE.REFERENCE_ANALYSE_ERROR_NONE; dependencyInfo = new DependencyInfo(); do { errorType = CheckDependencyInput(); if (IsAnalserFailed(errorType)) { break; } string configDir = UIAtlasEditorConfig.ReferenceResultPath; AtlasReferenceFilter filter = new AtlasReferenceFilter(configDir); List <string> assetPathTbl = GetAllAssetFilePath(); AnnalyseReferenceProgresser.GetInstance().InitProgresser(assetPathTbl.Count, "正向引用导出中"); int count = 1; foreach (var item in assetPathTbl) { AtlasReferenceInfo newInfo = null; if ( //YAMLAnalyser.IsAtlasPrefab(item) !filter.CheckDependencyFilter(item) ) { YAMLAnalyser.AnalyseAtlasReferenceInfo(item, out newInfo); if (newInfo != null) { dependencyInfo.DependencyInfoTbl.Add(item, newInfo); } } AnnalyseReferenceProgresser.GetInstance().UpdateProgress(count++); } } while (false); return(errorType); }