public static void RemoveIgnoredAsset(string assetPath) { var guid = AssetDatabase.AssetPathToGUID(assetPath); if (!IgnoredAssetGUIds.Contains(guid)) { IgnoredAssetGUIds = IgnoredAssetGUIds.Replace(guid, string.Empty); } }
public static void AddIgnoredAsset(string assetPath) { var guid = AssetDatabase.AssetPathToGUID(assetPath); if (!IgnoredAssetGUIds.Contains(guid)) { IgnoredAssetGUIds += "," + guid; } }
private static void DeserealizeIgnoredAssets() { ignoredAssets.Clear(); var ignoredAseetsGUIDs = IgnoredAssetGUIds.Split(','); foreach (var guid in ignoredAseetsGUIDs) { if (string.IsNullOrEmpty(guid)) { continue; } var assetPath = AssetDatabase.GUIDToAssetPath(guid); var asset = AssetDatabase.LoadAssetAtPath <UnityEngine.Object>(assetPath); if (asset) { ignoredAssets.Add(asset); } } }
private static bool IsAssetIgnored(string assetPath) { var guid = AssetDatabase.AssetPathToGUID(assetPath); return(IgnoredAssetGUIds.Contains(guid)); }