Hi,
I am working with UFPS multiplayer addon and i made a RPC like this:
public void startRound()
{
if (!PhotonNetwork.isMasterClient)
return;
Phase = GamePhase.Playing;
vp_MPClock.Set(GameLength);
TransmitGameState();
photonView.RPC("resetHealth", PhotonTargets.All);
}
And all players got a receiver:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class vp_BMGame : Photon.MonoBehaviour {
[PunRPC]
public void resetHealth()
{
this.transform.GetComponent<vp_FPPlayerDamageHandler> ().CurrentHealth = this.transform.GetComponent<vp_FPPlayerDamageHandler> ().MaxHealth;
}
}
But unity gives my this error: