protected override void OnJoinChannel(int channelID, bool success, string msg)
{
Debug.Log("Joined channel #" + channelID + " " + success + " " + msg);
// Set this as the network manager's channel id
NetworkManager.ChannelId = channelID;
if (ServerInfo.IsHost == true)
{
TNManager.SetHost(channelID, TNManager.GetPlayer(TNManager.playerID));
TNManager.SetServerData("serverIsPasswordProtected", (string.IsNullOrEmpty(ServerInfo.Password)) ? false : true);
TNManager.SetServerData("serverHost", TNManager.GetHost(channelID));
TNManager.SetServerData("lobbyChannel", channelID);
}
TNManager.GetServerData<string>("testValue"); // This line has a breakpoint
}
protected override void OnConnect(bool success, string message)
{
Debug.Log("Connected to " + ServerInfo.ExternalAddress + ": " + success + " " + message + " (Player ID #" + TNManager.playerID + ")");
TNManager.SetServerData("testValue", "babba gump");
if (ServerInfo.IsHost == true)
TNManager.CreateChannel(null, false, MaxPlayers, (string.IsNullOrEmpty(ServerInfo.Password)) ? null : ServerInfo.Password, true);
else if (TNManager.GetServerData<bool>("serverIsPasswordProtected") == true)
UIPasswordWindow.Show(TNManager.GetServerData<int>("lobbyChannel"), null);
else
TNManager.JoinChannel(TNManager.GetServerData<int>("lobbyChannel"), null, false, MaxPlayers, null);
}