Run On Server RPC in UMG

Hello,

Currently I have the need to send events to the server inside UMG Widgets. When using Run On Server RPC they continue to run only on the client. What am I doing wrong?

The event is called here and is client run inside the widget during the on drop event.

That’s because widgets only exist on the client and therefore do not replicate. The standard approach is to create the event on a class that does replicate, such as PlayerController, and call that from your widget. You can see an example of that here.

See my current question on network replication, lots of good info and link to network compendium which i highly recommend to read!

Your widget sends event to PController, controller then calls event in a replicated actor to be able to send rpc to other clients