Hi, I am currently working on some very basic networking stuff. I’m handling user connections: as soon as a client connects to the server, from within its PlayerController
it calls a Run on Server function which in turn calls a Multicast function that seems to correctly update the list of connected players to all clients.
However, from the opposite direction, that is having the server notify all clients after pressing a widget button, the same approach does not work. I have tried a Run on Server function that calls a Multicast function that should display a loading screen on the other clients: it only appears on the server. The Run on Server function is called from inside the widget’s graph (a button click event) by accessing the owning player controller, casting it to my type and calling the server function.
This approach instead seems to work:
This relies on storing all
PlayerControllers
in an array in my GameMode
after OnPostLogin
.
My question is: why this approach works, and the previous one does not?