Get Currently Connected Server

Hi,

How can I get the currently connected Server? I want to update my UI after a player connected to the their chosen server/best, beside using the PhotonHandler.BestRegionCodeInPreferences or save their chosen server index. Maybe something like PhotonHandler.CurrentlyConnectedServer?

Thanks,
Diori

Comments

  • You mean the currently connected Region?
    PhotonHandler.BestRegionCodeCurrently is the region that was currently pinged best. It will match BestRegionCodeInPreferences in most cases.
    The PhotonNetwork.networkingPeer.CloudRegion is the region (if any) used during connection.
  • Tobias said:

    You mean the currently connected Region?
    PhotonHandler.BestRegionCodeCurrently is the region that was currently pinged best. It will match BestRegionCodeInPreferences in most cases.
    The PhotonNetwork.networkingPeer.CloudRegion is the region (if any) used during connection.

    Yeah, I mean the region. I ever found a scenario that I was connected to Japan server, meanwhile my friend connected to Asia server. So I create option to choose server.
    Thanks Tobias, PhotonNetwork.networkingPeer.CloudRegion is working as I expected.