void Start()
{
DontDestroyOnLoad(this);
//Build the global config
GlobalConfig clientGlobalConfig = new GlobalConfig();
clientGlobalConfig.ReactorModel = ReactorModel.FixRateReactor;
clientGlobalConfig.ThreadAwakeTimeout = 10;
//Build the channel config
ConnectionConfig clientConnectionConfig = new ConnectionConfig();
reliableChannelID = clientConnectionConfig.AddChannel(QosType.ReliableSequenced);
unreliableChannelID = clientConnectionConfig.AddChannel(QosType.UnreliableSequenced);
//Create the host topology
HostTopology hostTopology = new HostTopology(clientConnectionConfig, maxConnections);
//Initialize the network transport
NetworkTransport.Init(clientGlobalConfig);
//Open a socket for the client
//Make sure the client created the socket successfully
//Create a byte to store a possible error
byte possibleError;
//Connect to the server using
//int NetworkTransport.Connect(int socketConnectingFrom, string ipAddress, int port, 0, out byte possibleError)
//Store the ID of the connection in clientServerConnectionID
NetworkTransport.Connect(clientSocketID, " ", 7777, 0, out possibleError);
//Display the error (if it did error out)
Debug.Log("Connection Failed");
}