Ability to filter FGameplayAttribute UPROPERTY selection?

We have been working with the Gameplay Abilities System and have been exposing FGameplayAttributes to UPROPERTYs for some of our systems/functions/data/etc (such as ‘skill to check’, etc). One thing we have ran into with these UPROPERTYs is that it’s not possible to filter the list of GameplayAttributes presented in editor for selection down to a limited set of attributes (similar to what Categories does/can do for FGameplayTags). This functionality would be highly appreciated (being able to filter to certain attributes or attribute sets, etc).

I do see there is functionality to filter OUT attributes with the ‘FilterMetaTag’ meta- but that can only _exclude things_, not _include things_. If a similar system was made to filter IN attributes (by checking metadata) I think that would be a good/acceptable solution to this problem.

Anything Epic could provide would be appreciated! Thanks!

Steps to Reproduce
Add a

UPROPERTY(EditAnywhere)

FGameplayAttribute Attribute;

to some class

Attempt to filter the selection to only include certain attributes / attributes from a certain AttributeSet, you cannot.

This is on my list of todos, but along with the larger task of making Attributes more editor friendly in general and a proper solution may be a while before it can be released. There’s no short term plan to update the existing filtering by epic, the larger refactor of Attributes constitutes a new method for filtering attributes altogether.

In the meantime The detail customization for attributes, as you stated, has a filter built in. It’s currently looking for `HideInDetailsView` meta or will use a filter meta string. These are used in the `FGameplayAttribute::GetAllAttributeProperties` function for filtering attributes specifically in editor. With some tweaking or adding some extra meta options this could be extended to be inclusive as well—or even filter by attribute sets. Since the function is a part of attributes any modifications will work with the existing UI as is.

Something like:

#if WITH_EDITOR
if (!FilterMetaStr.IsEmpty())
{
	if (Property->HasMetaData(TEXT("InclusiveAttributeFilter")) && !Property->HasMetaData(*FilterMetaStr))
	{
		continue;
	}
	
	if (!Property->HasMetaData(TEXT("InclusiveAttributeFilter")) && Property->HasMetaData(*FilterMetaStr))
	{
		continue;
	}
}

In AttributeSet.cpp allows you to use the same filter and mark it as inclusive instead of exclusive.

It is worth noting as well that the FilterMetaTag only accepts a single meta string, like `HideFromModifiers`. You could achieve a sort of inclusive filter by updating it so that you can parse multiple strings, then use the exclusion list as a “everything except these”, but that is harder to maintain as new categories come online.