Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Photon multiplayer little problem

Discussion in 'Multiplayer' started by bharatmehra232, Oct 14, 2022.

  1. bharatmehra232


    Feb 19, 2022
    So, just made out a simple game on photon with unity currently 2 things i am unable to do. Any help appreciated.

    1. Does after match ends player end up in same room ? Or if not what can i do to make them stay for another match. Or in what way to quit match so that everyone stay in same room.

    2. Trying to create a 4 player ready to leave button in game. As when everyone pressed ready to leave button then match ends. Seriously no idea how to do that with help of photon.

    Please help
  2. tobiass


    Apr 7, 2009
    PUN does not really mind how your game plays. You can play any number of matches in a room (but you can't keep rooms "forever"). You only need some way to update everyone to start a new round. One way to do that is to send an RPC or use RaiseEvent.

    You can use Custom Player Properties for that. Each player can set a value there and it gets synchronized.
    The Asteroids Demo (part of PUN 2 package) uses this for a "ready" button. This one starts the game but you just use it for ending it.