BP: How to get the name of the parent class of a class?


I would like to get the name of the parent class of a class. How can I do that in BP?
I was looking for a GetSuperClass function but didn’t find one. I cannot use the cast either or the reference because I don’t have the name of the class to cast to at that point.

Thank you

I doubt that functionality exists.

What you could do is check for a class being a child of another


You can make a function or macro if you like that will do a series of those ‘Class Is Child of’ checks and return the parent class.


Thank you.
I saw that function indeed but it is clearly not as flexible as a GetParentClassName for example…

What problem are you trying to solve?

Assume you want to check if your class overrided a variable’s value from the class it derived from, the natural thing to do would be CastTo (GetParentClassName()), if only we had a GetParentClassName. Or in example you want to cast to the parent that first have a different variable value because you need it for serializing correctly an asset^^. I’m not saying it is good to use such a method, but it can come in handy