Hello. I construct a UStaticMesh component programmatically inside my component and attach it to mine; it shows up right away. However, when I go to PIE mode inside the editor, it does not show up. If i click on any of the component settings in details panel while in PIE mode, it magically shows up and stays visible.
Regarding my slave static mesh component I do just this:
UStaticMeshComponent* StaticMeshComponent = ConstructObject<UStaticMeshComponent>(UStaticMeshComponent::StaticClass(), GetOwner(), NAME_None, RF_Transient);
StaticMeshComponent->AttachTo(this);
StaticMeshComponent->RegisterComponent();
StaticMeshComponent->SetStaticMesh(StaticMesh);
StaticMeshComponent->SetVisibility(true);
StaticMeshComponent->SetRelativeTransform(FTransform(TransformMatrix));
Any ideas why this is happening?