whats the right way to inherit a USTRUCT?

mgumley
Sun, 05 Mar 2017 22:31:01 +0000
Editor Scripting

I’m trying to inherit a FHitResult, so I can add some extra parameters to it. What I have here mostly works, but when I break the hit result in blueprints, only my two extra variables show, and I cannot see the parent’s variables. How can I fix this?

USTRUCT(BlueprintType)
struct Ftw_HitResult : public FHitResult {
	GENERATED_BODY()

	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "tw", Meta = (DisplayName = "Total trace time") )
	float total_trace_time;

	UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "tw", Meta = (DisplayName = "Velocity") )
	float velocity;
};

10 posts - 7 participants