I’m using the new Networking system introduced in Unity 5.
In my game, I need chat notifications about who killed who but this this code generates an error saying that I can’t send Components over network.
[ClientRpc]
public void Rpc_KillNotification(Character killer, Character victim){
Debug.Log(killer.name + " killed " + victim.name);
}
Most probably what I have to do is to send player ID but I don’t know where to get it or just send NetworkIdentity? Since I have another question too, I didn’t want to experiment.
So my questions are:
- How can I send a reference about a networked object passed as an argument in a Rpc function, and:
- How can I call a procedure only on a single client