UI Networking

Im wondering what the best practices way of having two users see the same UI updates over networking is.

Picture 10 cards as UI buttons on the
screen, when I click one, it gets put
into my inventory and removed from the
screen, the other player could do the
same thing, and we could both see this
happening.

The only way I can think of doing it, is having the UIs go through it’s playercontroller, which goes through the gamemode, and having the game mode on the server explicitly get PlayerController0 and PC1, and pass messages back and forth.

This doesn’t feel good, both because its a lot of intermediate steps to get the message passed, and because i have to explicitly get player controllers by index, so it could get quite complex if there were a lot of players.

I know I can’t do networking directly from UI, but there must be a better way to have the two players talk to each other directly than the above. I can’t do it through an actor, because only one client (the owner) can call a server function on that actor.

Thanks for the help!