I am trying to make values of a TSubobjectPtr changable in the editor, which works, but whenever I restart the editor the changes have reset.
My structure is basically this:
UCLASS()
class UActionObject : public UObject
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditInline, VisibleAnywhere, BlueprintReadOnly, Category = Configuration)
TSubobjectPtr<UActionConfig> ConfigForXY;
UPROPERTY(EditInline, VisibleAnywhere, BlueprintReadOnly, Category = Configuration)
TSubobjectPtr<UActionConfig> ConfigForAB;
}
UActionObject::UActionObject(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
ConfigForXY = PCIP.CreateDefaultSubobject<UActionConfig>(this, "Config 1");
ConfigForAB = PCIP.CreateDefaultSubobject<UActionConfig>(this, "Config 2");
}
and
UCLASS()
class UActionConfig : public UObject
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Configuration)
int32 numberTest;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Configuration)
bool bToggleTest;
}
UActionConfig::UActionConfig(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
numberTest = 42;
bToggleTest = false;
}
I can save extended blueprint assets and use them in PIE correctly, but once I restart the Editor all UActionConfig values are back to false and 42.
Am I doing something wrong or is this a bug?
greetings
FTC