I create my spline component in my constructor:
Spline = CreateDefaultSubobject<UImprovedSplineComponent>(TEXT("Spline"));
// Create a dummy root object
RootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("Root Component"));
Spline->AttachTo(RootComponent);
And then, in my construction script, I generate SplineMeshComponent objects based on that spline, and then register components:
USplineMeshComponent* SplineMesh = ConstructObject<USplineMeshComponent>(USplineMeshComponent::StaticClass(), this);
SplineMesh->CreationMethod = EComponentCreationMethod::UserConstructionScript;
SplineMesh->SetMobility(EComponentMobility::Movable);
SplineMesh->AttachTo(RootComponent);
// A bunch of code here to set the mesh, location, rotation, etc.
RegisterAllComponents();
When I edit a variable (choose a different mesh, switch a boolean, etc) the construction script updates. But if I only move a point on the spline, the construction script doesn’t update and while my spline changes, the track I’ve generated for it does not.
Is there something I need to hook up so that editing my spline re-constructs my mesh?