I’m trying to send an RPC back to the original sender like lets take for example.
player1 sends an RPC to player2 telling player2 to loose health. How do I make player2 identify who the RPC came from and send it back to player1?
I’ve already tried getting the networkView of player1 and sending it along with the first RPC but what I ended up doing was
Then inside this RPC method you get the sender object from the NetworkMessageInfo and use it to call a RPC-method on the original sender. For this you use the second type of RPC call described here (the one that uses NetworkPlayer as a target): http://unity3d.com/support/documentation/ScriptReference/NetworkView.RPC.html
Is it possible to send rpc to everyone except the original sender? Like the sender client wants to broadcast a chat message, sends it to server and then server sends the message to every other client?