Skip to content

Commit

Permalink
Merge pull request #55 from ruccho/feature/add_asset_filter_ignore_as…
Browse files Browse the repository at this point in the history
…sets

Ignore classes derived from `AssetFilterAsset` in adding asset filter menu
  • Loading branch information
Haruma-K authored Apr 2, 2024
2 parents 45d6675 + fd47ee6 commit 665db41
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Reflection;
using SmartAddresser.Editor.Core.Models.Shared.AssetGroups;
using SmartAddresser.Editor.Core.Models.Shared.AssetGroups.AssetFilterImpl;
using SmartAddresser.Editor.Foundation.CommandBasedUndo;
using SmartAddresser.Editor.Foundation.TinyRx;
using UnityEditor;
Expand Down Expand Up @@ -228,6 +229,7 @@ void AddFilter()
// Get types of all asset filter.
var types = TypeCache.GetTypesDerivedFrom<IAssetFilter>()
.Where(x => !x.IsAbstract)
.Where(x => !typeof(AssetFilterAsset).IsAssignableFrom(x))
.Where(x => x.GetCustomAttribute<IgnoreAssetFilterAttribute>() == null);

// Show filter selection menu.
Expand Down

0 comments on commit 665db41

Please sign in to comment.