public void CreateRoom() { if (NickNameField.text.Length >= 3) { RoomOptions roomOptions = new RoomOptions() { IsOpen = true, IsVisible = true, MaxPlayers = countPlayer }; PanelTextError.SetActive(true); PhotonNetwork.CreateRoom(CreateRoomTextName.text, roomOptions); loading.SetActive(true); } else if (NickNameField.text.Length < 2) { string _namestr = "Nickname must be more than 3 characters"; _panelText_Scr.DialogError(_namestr); } }
private void JointRoom() { if (PlayerPrefs.GetString("Player").Length >= 3) { PhotonNetwork.JoinRoom(namestring); } else if (PlayerPrefs.GetString("Player").Length < 2) { dialog.DialogError("Nickname must be more than 3 characters"); } }