Understanding what an RPC is
An RPC is a function that can be called locally but is executed on a different machine – for instance, a server computer may call a function on a client computer that will command it to spawn a visual effect or a sound somewhere in the level. Another useful application of an RPC is the ability to send messages bi-directionally between a server and a client over a network connection.
There are three types of RPCs available in Unreal Engine:
- Server: The function will be called by an object on the client PC but executed only on the server version of that same object. The client must own the object calling the method (if you need to, please check Chapter 5, Managing Actors in a Multiplayer Environment, for a refresher about owning an Actor).
- Client: The function will be called on the server by an object but executed only on the client version that owns the object calling it.
- NetMulticast: The function can be called on the server by...