Visual Studio 2019 LNK2001 Error with Replicated Properties and RPCs

First of all you can’t use the std string type it should be the Unreal FString.

It also has to be a const reference parameter since RPC’s are Read Only.

You should prefix all RPC’s with whatever type of RPC they are “Server”, “Client”, “NetMulticast” to make it clear that it is an RPC when calling it.

Finally you should consider adding WithValidation to validate any RPC’s from clients.


UFUNCTION(Server, Reliable)
void ServerSetUserName(const FString& UserName);


void AMyActor::ServerSetUserName_Implementation(const FString& UserName)
{

}