RPCs (Remote Procedure Calls)
RPCs allow you to invoke functions across the network, enabling communication between the server and clients. These examples are parameterless, but of course they can contain parameters.
Run on Server
[UFunction(FunctionFlags.RunOnServer | FunctionFlags.Reliable)]
public partial void ServerFunction();
public partial void ServerFunction_Implementation();
{
// Server-side code
}Run on Owning Client
[UFunction(FunctionFlags.RunOnClient | FunctionFlags.Reliable)]
public partial void ClientFunction();
public partial void ClientFunction_Implementation();
{
// Client-side code
}Multicast
Last updated