iterate through photon player gameobjects

79

iterate through photon player gameobjects -

[PunRPC]
    public void RPC_SetPlayers() {
     if(!PhotonNetwork.IsMasterClient) return;

      GameObject[] playersArray = GameObject.FindGameObjectsWithTag("Player");
      foreach(GameObject plr in playersArray) {
          plr.GetComponent<PointToPointRace>().playersToPositions = true;
      }
    }

Comments

Submit
0 Comments