I have a multiplayer game where a user can create a room with a name , and his friends can join it by searching it .I know how to accept the text and I’m using this script to search the room and join it
RoomInfo[] rooms;
public void SearchAndJoin(){
if(PhotonNetwork.connectionStateDetailed == ClientState.JoinedLobby){
if(inputFieldForRoomName.text == ""){
for ( int i = 1;i < rooms.Length; i++){
if (rooms[i].Name != inputFieldForRoomName.text)
NoRoom = true;
else NoRoom = false;
}
if (NoRoom == false){
PhotonNetwork.JoinRoom(inputFieldForRoomName.text);
}
else errorText.text = "NO SUCH ROOM, try again";
}
}
}
But when I assign this to a button and press it, nothing happens, not even the error text box shows anything ! Any help is appreciated.Thanks.