[Feature] Get parent class in blueprint

I’ve tested this in standalone, and not using single process, and using pie


UClass* UMyBlueprintFunctionLibrary::GetObjectParentClass(UObject* Object)
{
    return Object->GetClass()->GetSuperClass();
}

UClass * UMyBlueprintFunctionLibrary::GetParentClass(UClass* Class)
{
    return Class->GetSuperClass();
}

My usage, drag n drop swap between widgets, if widget is child of other widgets parent class.
Aka Left leg can swap with Right leg because they are both children of Leg_Base

Updated with code

Would love to see this put in the engine one day…

imagem

UE5 has this more or less, but the node is called Class Is Child of, although you have to specify the class you’re looking for

3 Likes

Class Is Child Of is also available in 4.27