Multiplayer UI Not Updating in Real-Time After Using Item (RepNotify/Event Dispatcher Issue)

Hello everyone,

I’m developing a co-op survival game and I’ve run into a multiplayer UI issue that I can’t seem to solve.

The Problem: When a client uses a consumable item from their inventory, the item is correctly used and removed from the inventory data. However, the UI does not update in real-time. The used item slot only disappears after I close and reopen the inventory widget.

My System Setup:

  • BP_InventoryComponent: An actor component on my player character. It holds the inventory data.

    • It uses a non-replicated TMap for the server’s master list.

    • It has a RepNotify TArray of a struct, which acts as a replicated “mirror” of the inventory for clients.

  • WBP_InventoryScreen: The main inventory widget.

  • WBP_InventorySlot: The widget for each individual item.

The Logic Flow: My update logic is designed to work like this:

  1. The client clicks on a WBP_InventorySlot, which calls a Server_UseItem event on the PlayerCharacter.

  2. Server_UseItem calls Server_RemoveItem on the BP_InventoryComponent.

  3. Server_RemoveItem correctly updates the server’s master TMap and then calls a function (UpdateReplicatedItems) to sync the TMap to the RepNotify TArray.

  4. This change in the RepNotify TArray correctly triggers the OnRep_ReplicatedInventoryItems function on the client.

  5. Inside the OnRep_ function, I call an Event Dispatcher named OnInventoryUpdated.

  6. In my WBP_InventoryScreen’s Event Construct, I get a reference to the inventory component and use a Bind Event to OnInventoryUpdated node. This node is connected to my PopulateSlots function, which clears and redraws all the item slots.

What I’ve Debugged: I have used Print Strings and confirmed the following:

  • The OnRep_ReplicatedInventoryItems function IS firing correctly on the client after an item is used.

  • The OnInventoryUpdated Event Dispatcher IS being called correctly from within the OnRep_ function.

It seems the signal is being sent, but the UI widget isn’t “hearing” it or reacting to it, even though the Bind Event node is set up.

I’m hoping someone can spot what I’m missing. Why isn’t my UI refreshing in real-time?

Thank you for your time!

usually this means the bind failed, ie the player/component didnt exit when you widget tried to bind. you can try a delay for debugging

Unless I’ve missed something, you are calling OnInventoryUpdated only on server(as it’s in Server function). Move that delegate call to your OnRep function. OnRep doesn’t need then to call PopulateItems on a ref to your widget (it might be null, as it’s not working?)