Show Sidebar

Regions

Photon Cloud provides you with global connectivity to allow low latency gaming all around the world.

Setup Regions in PUN

ConnectToBestCloudServer(string gameVersion) connects your client to the Master Server with the lowest ping. Results from pinging all Photon Cloud Master servers are saved in PlayerPrefs.

Use OverrideBestCloudServer(CloudRegionCode region) to explicitly set another region as "best" one.

You can setup the region as part of editing the PhotonServerSettings asset. Connecting to a region then becomes as easy as calling PhotonNetwork.ConnectUsingSettings().

For additional setup info using PUN please refer to the Initial Setup doc.

Photon Cloud Regions' Connect Flows
Connect to Photon Cloud regions

Available Regions

Photon Cloud has servers in several regions, distributed across multiple hosting centers over the world.

Each Photon Cloud region is identified by a "region token". To pass the region token with the "Connect" method of your client, call PhotonNetwork.ConnectToRegionMaster(regionCode, gameVersion).

List of available regions and tokens:

RegionHosted inToken
AsiaSingaporeasia
AustraliaMelbourneau
Canada, EastMontrealcae
Chinese Mainland (See Instructions)Guangdongcn
EuropeAmsterdameu
IndiaChennaiin
JapanTokyojp
South AmericaSao Paulosa
South KoreaSeoulkr
USA, EastWashingtonus
USA, WestSan Joséusw

Using the Chinese Mainland Region

First, you need to request access to the Chinese Mainland region for your Photon app. Send us an email so we could unlock it for your AppID.

The Photon NameServer has to be local to China, as the firewall might block the traffic otherwise. The Chinese Photon NameSever is "ns-cn.exitgames.com".

For example, use a compile condition (of your choice) or set the Photon NameServer at runtime before you connect (e.g. depending on user locale).

Follow these instructions to make a special build for the Chinese market:

  1. Open the "NetworkingPeer.cs" file and set the NameServerHost to "ns-cn.exitgames.com":
  2. Update CloudRegionCode and CloudRegionFlag enums to add new "CN" (or "cn") region token as follows:
  3. Use PhotonNetwork.ConnectToRegion(CloudRegionCode.cn, gameVersion) to connect to Chinese Mainland region.

 To Document Top