Hi everybody,
Maybe it’s a stupid idea, but I was wondering if there was a real interest to declare a parameter for an RPC as const reference, as I guess internally the data is copied anyway to be passed on the network.
I guess this is still useful to avoid one extra copy of the data, but i was wondering if you guys had an idea on the matter.
for example
UFUNCTION(Server, Reliable)
void Server_SetPlayerInfo(const FPlayerInfo& PlayerInfo);
vs
UFUNCTION(Server, Reliable)
void Server_SetPlayerInfo(FPlayerInfo PlayerInfo);
FPlayerInfo
being a USTRUCT composed of a few FStrings