{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Multicast RPC in Unreal Engine 5 C++ (NetMulticast)UE Docs

A Multicast Blueprint event maps to UFUNCTION(NetMulticast, Reliable) in C++, where the server calls the function and the body in MulticastPlayEffect_Implementation() runs on the server and all connected clients.

Blueprint node & C++ equivalent

C++
// .h
UFUNCTION(NetMulticast, Reliable)
void MulticastPlayEffect();

// .cpp
void AMyActor::MulticastPlayEffect_Implementation() { /* runs on all clients */ }

What is a Multicast RPC?

A Multicast RPC is invoked on the server and executed on every connected client plus the server itself. It is the go-to tool for cosmetic, world-visible effects such as explosions, sounds, or particle systems that everyone should see at the same time.

The C++ equivalent

Declare UFUNCTION(NetMulticast, Reliable) void MulticastPlayEffect(); in the header. The NetMulticast specifier fans the call out to all clients, and you place the real logic in MulticastPlayEffect_Implementation() in the .cpp.

Multicast RPCs must be called from the server (the authority) to propagate. Calling one from a client only runs it locally and does not replicate.

When to use it

Reach for a Multicast RPC when an action originates on the server and needs to be reflected visually on every machine. For one-off events, multicasts work well, but for state that joining players must also see, prefer a replicated variable or RepNotify, since multicasts are not received by clients that connect after the call.

Frequently asked questions

How do you create a Multicast RPC in UE5 C++?+

Declare UFUNCTION(NetMulticast, Reliable) void MulticastPlayEffect(); and implement MulticastPlayEffect_Implementation(). Call it from the server so it runs on the server and all clients.

Where does a NetMulticast RPC run?+

It runs on the server and every connected client. It must be invoked from the authority; calling it on a client only executes locally.

Should I use a Multicast RPC or a replicated variable for effects?+

Use a Multicast RPC for transient one-time effects everyone present should see. Use a replicated variable or RepNotify when late-joining clients also need the resulting state.

Related Networking & Replication nodes

View all Networking & Replication nodes →