Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

I can't send rpc

$
0
0
Hello I'm trying to mod game and add one rpc game found photon view but rpc don't send. I'm trying rpc secure and normal it's not working. My code:

if (GUI.Button(new Rect(45f, 160f, 90f, 15f), "test"))
{
if (UnityEngine.Object.FindObjectOfType<PhotonView>())
{
UnityEngine.Object.FindObjectOfType<PhotonView>().RPC("testd", PhotonTargets.All, false, new object[0]);
return;
}
UI.dialogWindow.ShowOk("Nope", null);
}
[PunRPC]
private void testd()
{
UI.dialogWindow.ShowOk("KK", null);
GameController.instance.players.localPlayer.buffs.ApplyBuff(BuffId.TOMATO);
}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>