- Home /
Photon change int
hello everyone, i am developing a multiplayer 3d game on a unity with a photon, the point is to collect 5 keys, but for some reason it does not work, please help ' code'
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
PhotonNetwork.Destroy(gameObject);
PhotonView.RPC("AddKey", RpcTarget.AllBuffered, mgk.Keys);
}
}
[PunRPC] void AddKey() { mgk.Keys++; }
Comment
Your answer
Follow this Question
Related Questions
Update int value with photon rpc? 0 Answers
Sending int value owned by Masterclient to other client 2 Answers
How to change value Photon 0 Answers
Photon in JavaScript? 1 Answer