Connecting to Photon and getting a list of rooms
Let's connect to Photon Cloud. There are three main ways of doing this:
- You can call
PhotonNetwork.ConnectUsingSettings
which will connect via the settings defined in the editor panel - You can call
PhotonNetwork.ConnectToBestCloudServer
which will ping each available server cluster and connect to the best one - You can call
PhotonNetwork.Connect
, passing the server address of the appropriate Photon region and the port - You can also use
ConnectUsingSettings
which will connect to the region we defined in the editor panel. We'll be using this for the rest of the chapter
Note
If you wish to use Connect manually, as of the time of writing, the addresses for each region are:
US (East Coast): app-us.exitgamescloud.com
EU (Amsterdam): app-eu.exitgamescloud.com
Asia (Singapore): app-asia.exitgamescloud.com
Japan (Tokyo): app-jp.exitgamescloud.com
And the port to connect on can be read from the static ServerSettings.DefaultMasterPort
field. You will...