Steps to Reproduce:
-
Create a C++ actor
-
Create a USplineComponent property
UPROPERTY(BlueprintReadOnly, Category = “SplineCraft”)
USplineComponent* SplineComponent;
2.1 Constructor & event OnConstruction
ASplineCraftLiteActor::ASplineCraftLiteActor()
{
PrimaryActorTick.bCanEverTick = true;
DefaultRootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("DefaultRootComponent"));
SetRootComponent(DefaultRootComponent);
SplineComponent = CreateDefaultSubobject<USplineComponent>(TEXT("SplineComponent"));
SplineComponent->SetupAttachment(DefaultRootComponent);
}
void ASplineCraftLiteActor::OnConstruction(const FTransform& Transform)
{
Super::OnConstruction(Transform);
BuildCraft();
}
-
Create a BP that derives from the actor
-
Place the actor on the level. Start adding or moving spline points.
Expected Result:
The OnConstruct event in the owner actor must be called.
Short video
https://mega.nz/file/U78AyAAT#dexqHSvO6GhjacFTSDcH8m6_KfjMZp4jmRRzc5L-uuI
Actual Result:
The OnConstruct event is not called in the owner actor.
Short video
https://mega.nz/file/xjUUwTCZ#ALAo044hlnwiUatjIRop8l0dOpLv7bWEnnSYGKNyCsU