I have a custom UObject structure that I have added to a Pawn class. I want to be able to see and edit the values of this custom UObject in blueprints when I view the BP of the Pawn. At the moment the best I can get is a reference to an object, which I have to rightclick->Edit.
Here is the relevant code for what I have atm:
----- PAWN CLASS -------
.h
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = CustomStats)
UModifiableStat* NewSpeed;
.cpp
APlayerPawnCombat::APlayerPawnCombat(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
NewSpeed = NewObject<UModifiableStat>();
NewSpeed->BaseValue = 40.0;
}
---- Custom UObject class ----
.h
UCLASS(ClassGroup = (CustomStats), ShowCategories = (CustomStats))
class SPACECOOP_API UModifiableStat : public UObject
{
GENERATED_BODY()
public:
UModifiableStat();
/*Base value for the stat, before any modifiers*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = CustomStats)
float BaseValue;
}
and here’s what I get in the editor :
What I would like is to have a drop-down expansion of the UObject in that panel so I can edit BaseValue. Is this possible?