I had a steady connection going with Photon and I also had a chat running for a little bit. Then I guess somehow I did something wrong because now everytime my Character is instantiated, I get this error.
PhotonView with ID 1001 has no method “SendChatMessage” marked with the RPC or @RPC(JS) property! Args:
UnityEngine.Debug:LogError(Object)
The PhotonView with ID 1001 is my instantiated character.
The chat has completely stopped working, so I’m unsure of where this SendChatMessage RPC is or what it even looks like.
RPCs are relating to a specific GameObject in PUN. So when you want to call a method X, you do that on some GameObject and this method has to be in a script that’s attached to this very GameObject.
The error you get is most likely happening because your character does not have the script with “SendChatMessage” attached.
For a chat, I would place a GameObject in the scene, put all the scripts on it and then keep it during runtime. Either player might use this.
The error I had was fixed, I had previously installed a different Chat asset and that put RPC’s all over the place. Finding and deleting the " SendChatMessage " RPC solved my problem.