Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Full photon player list

Discussion in 'Multiplayer' started by tookydo, Dec 20, 2014.

  1. tookydo

    tookydo

    Joined:
    Jul 15, 2014
    Posts:
    75
    I know there is a PhotonNetwork.playerList but I want to be able to send a RPC to all the players and it is not letting me do that. Basically there is a game, and then when the game is over, the GameManager knows who wins and all that. The I want the game to restart. So to to do that, I want to send a RPC function to all photon players in the room to reset all the variables and to have them re-spawn. Is there a way to send an RPC to everybody in the whole room? Or is there a better way to do it?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    By default an RPC goes to the other players in the room.
    You can use the PhotonTargets.All (3rd paramerter of RPC()) to execute the RPC locally, too.