[UMG] Network updated widgets

Hi I’m trying do fire an an events on all client in dedicated server mode.

This is what i have:

So theoretically every players should see the new widget added, right? But it doesn’t work. Any helps?

Widgets are not replicated, so sending replicated events on objects that are not themselves replicated will not result in replicated events going to all clients. You’d instead need to make the chat system part of something that is replicated like the player controller or maybe some shared game state. Then have the widget hook new message events and update themselves with the new messages.

I have found the problem, i think it is a bug. There is too much spawned widgets.
For each client 3 widget are spawned.

This is the same issue that occur here Problem with UMG / Networking 4.5

And reading comments

Yeah - make sure you check if the player controller is local if that’s where you’re creating the widgets.

Will be fixed?

It’s up to developers to check if the player controller is local before creating the widget. Additionally player controllers can have BeginPlay called multiple times, that part may be a bug, but I don’t know when or if it will be fixed. In the mean time you’ll need to use a DoOnce, or better would be to check if the HUD is valid, and not to recreate the HUD if one already exists.

I think the only way we can (make this easier | fix this) is to extend AHUD to be a new actor that can spawn and manage widgets and take care of most/all the local logic there, and make the HUD widget more of a dropdown option, instead of users writing the bootstrapping code themselves.

Hey nick, I myself struggled with similar non local instances doing things and overriding other instances for some time until I figured out the is locally controlled node. Would it be possible for the doc/engine support people to add some kind of tooltip or online documentation reminder of some sort somewhere to help people figure out this concept? I know it seems elementary now once I understand it, but it was hard to wrap my head around all these instances of the same object overriding eachother.