Regioning issue

Options

Initially, I couldn't figure this out because my games wouldn't connect. But after debugging for 4 hours I found the cause..
So I built my game on android. It connects to Asia region.
Ran my game on unity editor, that connected to India region.
I'm using the same WiFi connection on both. Why does it chooses two different regions?

Answers

  • L3sc
    Options
    AFAIK it's known thing Photon. For testing purpose I force to connect specific region. You can change it from code "PhotonNetwork.ConnectToRegion("regionCode");" or inside photon server settings file "Fixed region".
    Both takes region code you can find more detailed here:

    https://doc.photonengine.com/en-us/realtime/current/connection-and-authentication/regions
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Vindorable,

    Thank you for choosing Photon!

    What PUN version is this?
    If not PUN 2.17 (latest), update now and run once in Unity Editor then build again and retry.
    Added: New "Dev Region" feature. With this setting, all development builds will use the same region, avoiding initial matchmaking problems with best region selection. Development builds are turned on automatically, when the PhotonServerSettings get created initially and the "Dev Region" is set on first run in Editor.

    For more information about the issue itself read this.
  • Vindorable
    Options

    @JohnTube I'm using version 1.16. Alright, I'll give that a shot!
    @L3sc thanks! I'll play around with that code :)

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Vindorable

    1.16? you mean PUN Classic? that version is too old (3. August 2012), PUN is now 1.102!
    Maybe you meant 2.16?
    Or is it a Photon Voice version?
  • Vindorable
    Options

    @JohnTube LOL!! I was so shock that I'm using a 2012 old version until I checked. Yes, it's 2.16 phew