Cannot bind property of array element in Editor

UE4 supports binding property values with delegates. For example, this is how Brush property is declared in UImage:

/** Image to draw */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Appearance)
FSlateBrush Brush;

/** A bindable delegate for the Image. */
UPROPERTY()
FGetSlateBrush BrushDelegate;

When the same is declared inside USTRUCT that is used as an element of TArray, there is no Bind dropdown in the Editor. Sample, to demonstrate the idea:

#include "Engine.h"
#include "UMG.h"
#include "MyButton.generated.h"

USTRUCT()
struct FBindableBrush {
GENERATED_USTRUCT_BODY()
public:
  /** Image to draw */
  UPROPERTY(EditAnywhere)
  FSlateBrush Brush;
  /** A bindable delegate for the Image. */
  UPROPERTY()
  UWidget::FGetSlateBrush BrushDelegate;
};

UCLASS()
class UMyButton: public UButton {
GENERATED_BODY()
public:
  UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Brushes")
  TArray<FBindableBrush> Brushes;
};

Steps to reproduce:

  1. Add “Slate”, “SlateCore”, “UMG” as dependencies in Build.cs file of your project.
  2. Create “MyButton.h” in your project, copy-paste the sample above into it.
  3. Create “MyButton.cpp” that merely contains include of your project header and MyButton.h.
  4. Compile the project.
  5. Create a Widget Blueprint in the Editor.
  6. Drop “My Button” from “Common” section of the Palette.
  7. In the Properties window of the button, add an element to “Brushes” array.
  8. Observe that there is no “Bind” dropdown for the newly added element of the array. But if you put the same properties directly into a Widget (like UMG does in many places), then the “Bind” dropdown appears.

Can you provide the full class where you’re adding your struct? After editing my Build.cs file to include UMG, Slate, and SlateCore, I was still receiving compile errors when I added your struct to my custom UButton class.

Hi ,
I’m not sure why you closed Editor crashes with bindable property in UMG Slot - UI - Epic Developer Community Forums as a duplicate. They are completely separate issues, even though both related to bindable properties. This issue might be considered a feature request, depending on UE4 original expectations. The former issue is definitely a bug, since it leads to a crash.

I’ve edited both questions to contain steps to reproduce. I hope that helps.

Hey -

Thank you for the reproduction steps, I was able to reproduce the issue and have submitted a report here: Unreal Engine Issues and Bug Tracker (UE-37940) . You can track the report’s status as the issue is reviewed by our development staff.

Cheers