I am having a problem with a game using TNET. A TNET server / lobby server is being used. One client starts a game server, creates a channel with a level and enters the game. The intent is for the second client to join the server, retrieve a list of channels and then enter the channel of their choice after they make a choice. Currently when the second client joins the server they immediately enter the channel that the first client (who created the server) entered.
The first client is creating the server as follows:
void OnClick ()
{
TNServerInstance.Start (5127, 5128, "myServer",
TNServerInstance.Type.Udp, Tools.ResolveEndPoint("127.0.0.1", 5129));
TNManager.Connect ("127.0.0.1:5127");
TNManager.CreateChannel ("Game",true,2,"");
}
void OnNetworkConnect(bool success, string message)
{
if(success)
{
TNManager.JoinChannel(1, "Game");
}
}
The second client uses the following code to connect to the server:
TNManager.Connect ("127.0.0.1:5127");
Any suggestions appreciated. Thanks.