BUG PhotonView has no method marked with the [PunRPC](C#) property! Args: Int32
everything worked well for some time
anyone has any solution how to fix it and how is photonView
spat out the error?
anyone has any solution how to fix it and how is photonView
spat out the error?
private void OnTriggerEnter(Collider other) { if (other.gameObject.GetComponent<Zdrowie>() != null) { if (!Network.IsOffline()) { if (other.gameObject.GetComponent<PhotonView>() != null) { other.gameObject.GetComponent<PhotonView>().RPC("RPC_Obrarzenia", RpcTarget.All, Damage); } } else { other.gameObject.GetComponent<Zdrowie>().RPC_Obrarzenia(Damage); } } if (!other.isTrigger) { Network.Destroy(gameObject, true); } }
public class Zdrowie : MonoBehaviourPun,IPunObservable { //~100 code line [PunRPC] public void RPC_Obrarzenia(int value) { zdrowie -= value; } }
0
Comments
-
never mind fixed it
spawner required a little delay in the start function0