ServerRpc can be invoked by a client to be executed on the server.
Developers can declare a
ServerRpc by marking a method with
[ServerRpc] attribute and making sure to have
ServerRpc suffix in the method name.
Developers can invoke a
ServerRpc by making a direct function call with parameters:
Marking a method with the
[ServerRpc] attribute and putting
ServerRpc suffix to the method name are required, otherwise it will prompt error messages:
[ServerRpc] attribute and matching
...ServerRpc suffix in the method name are there to make it crystal clear for RPC call sites to know when they are executing an RPC, it will be replicated and executed on the server-side, without necessarily jumping into original RPC method declaration to find out if it was an RPC, if so whether it is a