Andargor
(Andargor)
March 29, 2014, 5:16am
1
I have this struct, how can I have access to a “break GameButtonStyle” function in blueprints? Do I have to define getters?
USTRUCT(BlueprintType,Transient)
struct FGameButtonStyle {
GENERATED_USTRUCT_BODY()
UPROPERTY()
FVector2D Size;
UPROPERTY()
UTexture2D* Texture;
UPROPERTY()
UFont* TextFont;
UPROPERTY()
float TextScale;
UPROPERTY()
FLinearColor TextColor;
FGameButtonStyle() {
Size = FVector2D(0, 0);
TextScale = 1.0f;
Texture = NULL;
TextFont = NULL;
}
};
1 Like
I think UPROPERTY(BlueprintReadWrite) might do what you are wanting.
2 Likes
Dig_Squid
(Dig_Squid)
March 29, 2014, 2:06pm
3
I agree. Once you mark up your variables as ‘blueprint editable’, the Blueprint editor should offer you make/break nodes automatically for structs when you drag off a pin of that type and release.
1 Like
Andargor
(Andargor)
March 29, 2014, 2:22pm
4
Thanks that was it. I had to also add a category to the UPROPERTYs and restart the Editor for the make/break to appear.