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.