Hi all,
Just having some trouble getting RPC’s to work in photon and I was wondering if anyone here could point me in the right direction.
I’m just getting started with multiplayer and I wanted to convert this code over to unityscript.
[RPC]
void ChatMessage(string a, string b)
{
Debug.Log("ChatMessage " + a + " " + b);
}
This is my converted JS version,
import PhotonNetwork;
@RPC
function ChatMessage(a : string, b : string )
{
Debug.Log("ChatMessage " + a + " " + b);
}
And I get this error -
BCE0004: Ambiguous reference ‘RPC’: PhotonNetwork.RPC(PhotonView, String, PhotonTargets, *Object[ ]), PhotonNetwork.RPC(PhotonView, String, PhotonPlayer, *Object[ ]), UnityEngine.RPC.
Any ideas what I might be doing wrong? Or if anyone has any basic JS example scenes they could share I reckon I could deconstruct it.
Anyway thanks!
Pete