Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
      }
    }
Source by forum.photonengine.com #
 
PREVIOUS NEXT
Tagged: #iterate #photon #player #gameobjects
ADD COMMENT
Topic
Name
3+3 =