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 Photon multiplayer little problem

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

  1. bharatmehra232

    bharatmehra232

    Joined:
    Feb 19, 2022
    Posts:
    1
    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

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    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.