Connecting to a Photon Server from Unity is very simple. You just need to specify the IP, port, and application which you want to use (in this case, we will specify
PhotonAckServer as the application). Each application defined in the Photon Server configuration will run alongside each other—this lets you run a number of different server types such as master servers and game servers on a single physical machine.
Let's create a script to connect to Photon, service the connection ten times per second, and sends a test message to the server (which responds with an acknowledgement message).
First, we'll start with this:
using UnityEngine; using System.Collections; using ExitGames.Client.Photon; public class PhotonAckClient ...