When the default values of a struct are set in code and an array of the struct type are added as a class variable, creating a blueprint of the class with show array elements with the "reset defaults" arrow regardless of the current/default value.
USTRUCT(BlueprintType) struct FMyTestStruct { GENERATED_USTRUCT_BODY() FMyTestStruct() { Anum = 45.234; Abool = true; } UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) float Anum; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) bool Abool; };
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test) TArray<FMyTestStruct> Astruct;
Result:
Anum and Abool will show the values set in code but will have the yellow arrow indicating the default value has been changed. Clicking the yellow will change the values to 0.0 / false, respectively.
Expected:
Default values are set and editor recognizes them as the default values.
Head over to the existing Questions & Answers thread and let us know what's up.
19 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.13.2, 4.14, 4.19, 4.20 |
Created | Nov 14, 2016 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |