IEnumerator Start () {
while (TNManager.IsJoiningChannel(2)) yield return null;
// When joined -->
print ("Joined channel 2 "+TNManager.IsInChannel(2)+" "+TNManager.lastChannelID);
Returns '0' for lastChannelID, not '2', the most recent channel joined. As a result, TNManager.isHosting fails if I leave the previous Channel.
That is, staying in the previous Channel 1
TNManager.JoinChannel(2, "", false, AiaVG_GameManager.netMaxNumPlayers, "", false);
TNManager.LoadLevel (2, "Adventuring");
means TNManager.isHosting returns true, lastChannelID == 1.
TNManager.JoinChannel(2, "", false, AiaVG_GameManager.netMaxNumPlayers, "", true);
TNManager.LoadLevel (2, "Adventuring");
means TNManager.isHosting returns false with lastChannelID == 0.
Even if I set the host manually, TNManager.isHosting fails...
TNManager.JoinChannel(2, "", false, AiaVG_GameManager.netMaxNumPlayers, "", false);
if (TNServerInstance.isActive){
TNManager.SetHost (2, TNManager.player);
}
TNManager.LoadLevel (2, "Adventuring");