How to break a struct in blueprints?

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

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

Thanks that was it. I had to also add a category to the UPROPERTYs and restart the Editor for the make/break to appear.