What is a good method for getting the NetworkPlayer when you received an RPC?
I don’t want to pass anything like playername or viewID because the client could change any of those things. What I want is for unity to tell me the NetworkPlayer of packet I just received.
Is there a way to do this?
Thanks!
You can append an optional NetworkMessageInfo to all of your RPC functions, which contains all sorts of valuable information, including the sender:
@RPC
function MyRPC (info : NetworkMessageInfo)
{
print(info.sender.ToString());
}
Thank you!! Is this documented somewhere? n/m found it in the RPC docs. Thanks again. 