Download

Shared Inventory and Widget in Network Game

Hi there, I want to have a shared Inventory and a widget that replicates on every client.

Something like this:

Player wants to open Inventory -> Inventory opens on all clients -> only client that opened Inventory can control it

Is there a possibility to replicate a widget at all?

You don’t need the widget to replicate. You only need the state of your inventory to replicate. So whenever anyone does anything with the inventory, you replicate the event that executes that action.

No, I want to the Inventory access to be visible by everyone, because I have a shared camera.

I’d try to implement that as an “inventory actor.” I’d make this actor be “always relevant” in network properties.
The “inventory actor” would have the list of items (of course!) as a replicated property, as well as a “is showing widget” replicated property, and “currently controlling player” replicated property.
When someone requests the inventory, they send an event to that effect to the server, and the server does the “who gets to control it” determination, and then sets the “inventory is open” flag.
I’d use RepNotify to make the actor show the appropriate widget when that flag is set on each client.