If the final instance might inherit from UMinimap it will return the leaf name.
As @anonymous_user_f5a50610 said you can actually get the native class names, so it really depends on your situation. Using the class name will be a bit less flexible against adding a method that returns the name you want (an FName), so it would be solving your case only with pure inheritance and manual setup or with reflection and done all automatically.
Manager of widgets. Every widget in this manager can be created only once and only by this manager (like a singletons). And all this widgets can be refer to this manager. And can also find himself in. The case: invalidation on specified widget. I call method Invalidate on widget, and widget sets self to nullptr on the Manager using reflection (TFieldIterator). How to found self in manager? Using C++ ancestor typename for example (the blueprint widget is inherited from C++ widget).
No other childs… But this is interesting too. The parent tree of clasees.
Ok so it I understand it correctly you need a string that matches exactly the name of the last native class of a given hirachy and the whole hirachy is inheriting from a common native class let’s say UBaseWidget?
In that case I would just add a virtual function to `UBaseWidget`` that returns the string of the last native class, the function could be a BlueprintCallable so you can not re-implement it in BP.
I may be a bit late, I got into the same problem that you, I needed to get the name of the CPP class from a Blueprint call. The accepted answer doesn’t really solve the problem, so here you are, an easy and clean solution:
If you want to get the CPP class, you can just use StaticClass()
I hope this helps in the future to people that get into the same problem.