Photon Cloud provides you with global connectivity to allow low latency gaming all around the world.
Setup Regions in PUN
connects your client to the Master Server with the lowest ping.
Results from pinging all Photon Cloud Master servers are saved in PlayerPrefs.
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
For additional setup info using PUN please refer to the Initial Setup doc.
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
|Chinese Mainland (See Instructions)||Guangdong||cn|
|South America||Sao Paulo||sa|
|USA, West||San José||usw|
Using the Chinese Mainland Region
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:
- Open the "NetworkingPeer.cs" file and set the
CloudRegionFlagenums to add new "CN" (or "cn") region token as follows:
PhotonNetwork.ConnectToRegion(CloudRegionCode.cn, gameVersion)to connect to Chinese Mainland region.