Hi there! I am not sure ConstructObject is still supported.
What I am currently using to add components at runtime in UE 4.23 is something like this (called from the Actor to which the component is being added):
USphereComponent* SpawnedComponent = NewObject<USphereComponent>(this, "SphereComponent");
if (SpawnedComponent)
{
//In case your component derives from USceneComponent, you can/should setup its attachment to the Actor's root
SpawnedComponent->SetupAttachment(RootComponent);
SpawnedComponent->RegisterComponent();
}
If you need to setup your RootComponent, here’s how I do that, in the Actor’s constructor: