HELP ! UE4.25.3 Error! Blueprint components missing location and rotations

If you are adding components from C++, you have to call SetupAttachment for them, otherwise things will get weird.



// Pseudo code...

WeaponMeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("WeaponMeshComp"));
RootComponent = MeshComp;

WeaponSightComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("WeaponSightComp"));
WeaponSightComp->SetRelativeLocation(FVector(0.0f, 5.0f, 10.0f));
WeaponSightComp->SetupAttachment(RootComponent);