I don’t think he quite understands how to ask his question. I think what he’s conceptually getting at is this:
- UObject → UMyBaseType → UMyDerivedTypeCPP
- UObject → UMyBaseType → MyBlueprintType
"Both “UMyDerivedTypeCPP” and “MyBlueprintType” have a function on them with the same name. (I’m assuming that function is exposed to script on “UMyDerivedTypeCPP”). “MyBlueprintType” is a blueprint that derives from UMyBaseType in the editor, however “UMyDerivedTypeCPP” is a concrete C++ class. He wants to keep a single list containing both inherited types.
I think he wants something like this:
TArray<UMyBaseType*> MyListOfAllDerivedTypes;
I’m assuming it’s because he’d like to iterate over the list and call the named function on each item. I can see why you’d want to do it this way. You could prototype quickly in a blueprint (perhaps a designer creates the first draft of the function). Then in testing you find that it’s slow. A programmer creates a C++ class that takes the place of the blueprint class and the function is rewritten to make it quicker.