I have a InventorySlotWidget in C++ which a blueprint widget extend from it. When I try to update my UI on the Event On List Item Object Set nothing happens, it simply don’t update the UI, am I missing something?
Notes: I tried using a static texture and still doesn’t work, so it’s not a problem with the data coming from “Event On List Object Set”, I also tried to update on Event Tick and it worked normally
UCLASS()
class TOPDOWNSURVIVAL_API UInventorySlotWidget : public UUserWidget, public IUserObjectListEntry
{
GENERATED_BODY()
virtual void NativeConstruct() override;
public:
UFUNCTION(BlueprintCallable)
void UpdateImage(UItemDataAsset* Item);
UFUNCTION(BlueprintCallable)
void UpdateWithItem(FItemStackStruct ItemStack);
virtual void NativeOnListItemObjectSet(UObject* ListItemObject) override;
protected:
UPROPERTY(meta = (BindWidget))
UImage* Icon;
UPROPERTY(meta = (BindWidget))
UTextBlock* AmountText;
};
void UInventorySlotWidget::NativeOnListItemObjectSet(UObject* ListItemObject)
{
IUserObjectListEntry::NativeOnListItemObjectSet(ListItemObject);
}