So I have a player prefab with a PhotonView on it. I also have this code on a collider…
if(other.gameObject.GetComponent<PhotonView>().IsMine) {
GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
Debug.Log(players[1].GetComponent<PhotonView>().viewID); //BROKEN HERE
}
Can anyone see why this would not work. I have using Photon.Pun; and MonoBehaviourPun but I get the error…
error CS1061: ‘PhotonView’ does not contain a definition for ‘viewID’ and no accessible extension method ‘viewID’ accepting a first argument of type ‘PhotonView’ could be found (are you missing a using directive or an assembly reference?)
Thanks