You need to attach it to the RootComponent
CubeMesh ->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
You need to attach it to the RootComponent
CubeMesh ->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);