private static void CheckUnusedState() { Utility.DebugLog("CheckUnusedState"); var markFile = AssetsUsageChecker.GetMarkFile(); if (File.Exists(markFile)) { List <string> assets = AssetsUsageChecker.Check(); if (assets != null && assets.Count > 0) { HashSet <string> usedFiles = new HashSet <string>(); foreach (var item in assets) { usedFiles.Add(item); } APCache.UpdateUsedStatus(usedFiles); APCache.SaveToLocal(); File.WriteAllText(AFTERBUILD_A_PLUS, string.Empty); } File.Delete(markFile); } }
private static void CheckUnusedState() { Utility.DebugLog("CheckUnusedState"); string key = AssetsUsageChecker.GetUniqueAssetCheckerKey(); Utility.DebugLog("Checking key: " + key + ", with result = " + EditorPrefs.HasKey(key)); if (EditorPrefs.HasKey(key)) { List <string> assets = AssetsUsageChecker.Check(); if (assets != null && assets.Count > 0) { HashSet <string> usedFiles = new HashSet <string>(); foreach (var item in assets) { usedFiles.Add(item); } APCache.UpdateUsedStatus(usedFiles); APCache.SaveToLocal(); EditorPrefs.SetString(AFTERBUILD_A_PLUS, AFTERBUILD_A_PLUS); EditorPrefs.DeleteKey(AssetsUsageChecker.GetUniqueAssetCheckerKey()); } } }