How can I use a stored UClass type to initialize an object?
E.g. to do something like this:
TSubclassOf<class UShapeComponent> shapeType; UShapeComponent* newComponent = CreateDefaultSubobject<shapeClass>("SomeComponent");
(basically, I want to not have to specify the shape type, to accept both sphere and box shapes)
I looks pretty simple but I can’t figure it out.