I am trying to make it where a certain number of players are required before the client sends everyone to the character select scene.
Within a function I have...
if (PhotonNetwork.PlayerList.Length == 1 & PhotonNetwork.IsMasterClient == true)
{
PhotonView PV = PhotonView.Get(this);
PV.RPC("heroSelect", RpcTarget.All);
}
Further in my code I then change the scene with...
[PunRPC]
void heroSelect()
{
SceneManager.LoadScene(2);
}
I am getting "Object reference not set to an instance of an object" as an error on the line
PV.RPC("heroSelect", RpcTarget.All);