hi,
so i just started converting my blueprints to c and i have a UActorComponent class that i want to have a UCurveFloat variable/property that can be set via the objects details panel. however, the curve is always null.
i get to select the curve in the editor but when i move the object (the owner actor calls the initialize function) i get the curve is null output
thanks for the help
here is the header
#pragma once
#include "CoreMinimal.h"
#include "VIZCMeshSpline.generated.h"
class UCurveFloat;
UCLASS(config = Engine, Blueprintable, BlueprintType, ClassGroup = (Custom), meta = (BlueprintSpawnableComponent, IsBlueprintBase = true))
class V3_API UVIZCMeshSpline : public UActorComponent
{
GENERATED_BODY()
public:
UVIZCMeshSpline();
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (DisplayName = "Way Curve", Category = "Default", MultiLine = "true", OverrideNativeName = "WayCurve"))
UCurveFloat* WayCurve;
virtual void Initialize(float TimeStart) override;
};
and the source
#include "VIZCMeshSpline.h"
#ifdef _MSC_VER
#pragma warning (push)
#pragma warning (disable : 4883)
#endif
PRAGMA_DISABLE_DEPRECATION_WARNINGS
PRAGMA_DISABLE_OPTIMIZATION
UVIZCMeshSpline::UVIZCMeshSpline() : UActorComponent()
{
bCanEverAffectNavigation = false;
}
PRAGMA_ENABLE_OPTIMIZATION
void UVIZCMeshSpline::Initialize(float TimeStart)
{
if (!IsValid(WayCurve))
{
UE_LOG(LogTemp, Warning, TEXT("UVIZCMeshSpline curve is null"));
return;
}
}