Getting current CloudServerRegion?

Options
Just a quickie! Is it possible to get the CloudServerRegion of the server that PUN is currently connected to?

Comments

  • vadim
    Options
    Use PhotonNetwork.networkingPeer.CloudRegion to get currently connected region.
  • GarethIW
    Options
    Thanks! Will that string parse to the CloudServerRegion enum?

    edit: tried this, and PhotonNetwork.networkingPeer.CloudRegion seems to be null (tried in OnConnectedToPhoton and after a couple of minutes in Update it's still null)
  • vadim
    Options
    Will that string parse to the CloudServerRegion enum
    CloudServerRegion contains all available regions. So normally CloudRegion returns string made from one of enum elements
    PhotonNetwork.networkingPeer.CloudRegion seems to be null
    Works for me (printing it in OnGui).
    What is the client state when you check property?
    Do you use name server?
    Is your version of PUN latest?
  • GarethIW
    Options
    Thanks Vadim,

    Just needed to update to latest, all working now!