I have got a chat script and it works, but now I wanted to add the player name. The error says that there is no RPC-Function that takes two arguments, but there is:
[RPC]
void ChatMessage(string playerName, string msg){
messages.Add (playerName + ": " + msg);
}
And that’s how I call the function:
PhotonView photonView = PhotonView.Get(this);
photonView.RPC("ChatMessage", PhotonTargets.All, PhotonNetwork.playerName, new object[]{currentMessage});
Can you help me?