I've rewritten the frontend to provide a straight forward server list. When creating a game, pressing the Create creates a channel with the password set from a text field. Running the same app on different Android devices, for some of them the server password is set and for others it's apparently not.
Trying to debug, I've added an NGUI UILabel and change its text at various places like OnNetworkConnect and OnNetworkJoin. Without leaving the scene, I've had a "MissingReferenceException: The object of type UILabel has been destroyed..." error even though the object is untouched, but it's inconsistent.
The offending line is DEV_Debug.text = "Channel list refresh "+list.Count+" "+list.buffer[0].hasPassword;
void OnChannelListRefresh(List<Channel.Info> list) {
// use list[index].data.GetChild<string>("ChannelName");
print ("Channel list refresh "+list.Count+" "+list.buffer[0].hasPassword);
DEV_Debug.text = "Channel list refresh "+list.Count+" "+list.buffer[0].hasPassword;
if(!list.buffer[0].hasPassword){
TNManager.JoinChannel (1,"MatchLauncher");
}else{
// show password panel
print ("netPasswordPanel.SetActive");
DEV_Debug.text = "netPasswordPanel.SetActive ";
twn_netPassword.SetActive (true);
}
}
The same can happen with the twn_netPassword GameObject, getting the error it's been destroyed when the line is called in OnChannelListRefresh(). At which point the password panel doesn't show and I can't enter the password, although I can enable it manually in the editor.
I also have the password not be accepted the first time I enter it, and have to reenter
public void EnterPassword(){
// Enter into password to gain access
netPassword = password.text.Trim ();
print ("Enter password "+netPassword);
// attempt join
TNManager.JoinChannel (1,"MatchLauncher",false,2,netPassword);
}
The attached shows the correct password being rejected twice before being accepted.
Edit: Also added console report on missing UILabel and GameObject. I just press the same button 3 times, a few seconds between each time, and the third time it works. The UILabel in question is just a stationary, no nonsense label. That's maybe an NGUI problem.