How to do matchmaking through every region?

Options
Hi all!

I want to make possible to connect the users across different regions without manually selecting the region in the game everytime a user wants to play.
I think the best method would be to
  • get the list of regions
  • sort the list with the ping, so the lowest ping region would become the first element
  • try to connect that region, and check if there's a user in that region
  • if no users have been found, and after a few seconds have passed, then check the next region.
  • if no users could have been found in any regions, then do other things

I believe this would be the logical way to do matchmaking, but I can't find any informations about these steps neither in the documentation, nor in the website.

Any idea how to solve this? What is the usual way of doing matchmaking?

Comments

  • gregtom6
    Options
    there's a method named PhotonNetwork.ConnectUsingSettings()
    if you implement OnConnectedToMaster, then ConnectUsingSettings will connect to the master server
    but if you also implement OnRegionListReceived, the ConnectUsingSettings will connect to the name server....