I’m trying to create an inventory system, the Inventory widget has an array of Item sub-widgets which i want to declare on UMG Designer. But when i declare them and then compile, it turns them back to blank.
InventoryWidget.h
UInventorySubWidget : public UUserWidget
{
GENERATED_BODY()
protected:
UInventorySubWidget(const FObjectInitializer& ObjectInitializer);
virtual void NativeConstruct() override;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(BindWidget))
TArray<class UItemSubWidget *> Items;
};
Before Compile:
After Compile: