UPROPERTY(VisibleDefaultsOnly, Category = Spline)
USplineComponent* SplineComponent;
SplineComponent = CreateEditorOnlyDefaultSubobject<USplineComponent>(TEXT("SplineComponentsFrame1"));
if (SplineComponent)
{
SplineComponent->SetClosedLoop(true);
RootComponent = SplineComponent;
}
This works well inside editor but in game, the splinecomponent is not created. I have tried a lot of things to make it work but it seems bugged any idea?