Hello there, I have very peculiar problem about using scene componets spawned in the editor.
So, I have a custom scene component like this:
UCLASS(Blueprintable, ClassGroup=(Custom), meta = (BlueprintSpawnableComponent))
class UTestSceneComponent : public USceneComponent
{
GENERATED_BODY()
public:
UTestSceneComponent();
UPROPERTY(EditAnywhere)
USplineComponent* SplineComponent;
};
SplineComponent created with
SplineComponent = CreateDefaultSubobject<USplineComponent>(TEXT("SplineComponent"));
SplineComponent->SetupAttachment(this);
in constructor. If I add this component to actor in c++, all good, in the editor in actor’s edit view I can see my spline, I can select it and add new points etc. But if I add component in the editor, I don’t see spline anymore, and also can not edit it. I suspect its desired behaviour because of different ways to spawn the component from c++ and from the editor under the hood.
But my question is: I need the way to add few custom components in the editor and still be able to edit their properties. Can somebody suggest the solution?
On my example there is just a spline, but in reality custom scene component is more complicated. Image below for more visibility of the difference
Thanks in advance