I am creating a SceneComponent in my C++ class.
.h file:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = RootComp)
TSubobjectPtr<USceneComponent> RootScene;
Constructor Code:
RootScene = PCIP.CreateDefaultSubobject<USceneComponent>(this, TEXT("Root Scene"));
RootComponent = RootScene;
In the blueprint, I am adding other components (meshes etc.) as children to this root SceneComponent. Everything works fine until I try to duplicate my Actor in the viewport. The Actor gets duplicated, but it shows the root SceneComponent as None. There is no Transform to the duplicated Actor either since it is a part of the SceneComponent itself. The child components also fail to appear since the root itself has failed to be copied.