I have two classes.
UTestComponent ← A scene component that creates a spline and attaches it to itself.
UTestActor ← an actor that creates for it a root scene component and a spline component attached to it.
The final structure is the same in both TestActor and if I create an empty actor and add the TestComponent to it.
Code in the component constructor:
path = CreateDefaultSubobject<USplineComponent>("Spline"); path->AttachTo(this); path->bEditableWhenInherited = true;
Code in the Actor constructor:
Root = CreateDefaultSubobject<USceneComponent>("RootCompt"); spline = CreateDefaultSubobject<USplineComponent>("Spline"); RootComponent = Root; spline->AttachTo(Root); spline->bEditableWhenInherited = true;
In the actor class the spline points are selectable and editable,
BUT if I add the testComponent to an empty actor, even when the structure is the same, the spline is not editable, I can’t select the points, but I can see the curve.
Is this a bug?
[EDIT] And yes, the curve has UPROPERTY(EditAnywhere) and I can modify the data from anywhere. But I can’t select the control points.