FBlackboardKeySelector::AddClassFilter as I could figure should add a class filter to blackboard key that filters by base class passed as AllowedClass parameter.
But AllowedClass is of type TSubclassOf< UClass > and there are no heirs of UClass class, and when you assign
UGameplayAbility::StaticClass to AllowedClass, then on conversion back to UClass* inside the function it becomes nullptr.
Shouldn’t AllowedClass be of type TSubClassOf< UObject > to properly allow filtering blackboard keys by class same as AddObjectFilter?
In fact if i manually do as follows:
FName PropertyName = GET_MEMBER_NAME_CHECKED(UBTTask_UseGameplayAbility, BlackboardKey);
const FName FilterName = MakeUniqueObjectName(this, UBlackboardKeyType_Class::StaticClass(), *FString::Printf(TEXT("%s_Class"), PropertyName.ToString()));
UBlackboardKeyType_Class FilterOb = NewObject<UBlackboardKeyType_Class>(this, FilterName);
FilterOb->BaseClass = UGameplayAbility::StaticClass();
DesiredAbilityKey.AllowedTypes.Add(FilterOb);
and then try to edit behavior tree I’m allowed to select a Key of Class Type that has a base class of UGameplayAbility