{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Server RPC in Unreal Engine 5 C++ (UFUNCTION Server)UE Docs

A Run on Server Blueprint event becomes UFUNCTION(Server, Reliable) in C++, where you call the function name from a client and write the actual logic in the matching ServerFire_Implementation() that executes on the server.

Blueprint node & C++ equivalent

C++
// .h
UFUNCTION(Server, Reliable)
void ServerFire();

// .cpp
void AMyActor::ServerFire_Implementation() { /* runs on server */ }

What is a Server RPC?

A Server RPC is a remote procedure call sent from an owning client up to the server, so the authoritative machine can run gameplay logic like firing a weapon. It is the standard way for a player to request a state change that only the server is allowed to make.

The C++ equivalent

Declare the function in the header with UFUNCTION(Server, Reliable) void ServerFire();. The Server specifier routes the call to the server, and Reliable guarantees delivery. You do not implement ServerFire() directly.

Instead, the engine generates the callable stub and you write the body in ServerFire_Implementation() in the .cpp, which is what actually runs on the server. Calling ServerFire() from the owning client triggers the RPC.

Common mistakes

The implementation must be named exactly FunctionName_Implementation, or you get a linker error. A Server RPC only sends from the client that owns the Actor, so calling it on a non-owned Actor does nothing. Use Reliable for gameplay-critical calls and Unreliable only for high-frequency, droppable data.

Frequently asked questions

How do you make a Server RPC in UE5 C++?+

Declare UFUNCTION(Server, Reliable) void ServerFire(); in the header and implement ServerFire_Implementation() in the .cpp. Call ServerFire() from the owning client to run it on the server.

Why do I implement _Implementation instead of the function itself?+

Unreal generates the networking stub for the declared function and routes the call over the network. Your actual code goes in the _Implementation version, which runs on the target machine.

What does Reliable mean in a Server RPC?+

Reliable guarantees the RPC is delivered and not dropped, which is important for gameplay-critical actions. Use Unreliable only for frequent, non-essential calls.

Related Networking & Replication nodes

View all Networking & Replication nodes →