void OnJoinSubmit() { if (m_NetManager == null) { return; } m_NetManager.StartClient(); SpinnerPopup.ShowPopup( "Connecting to Host", () => { while (!NetworkClient.isConnected) { if (!NetworkClient.active) { return(true); } } return(true); }, () => { if (!NetworkClient.active) { InfoPopup.ShowPopup("Connection Failed", () => {}); } else { this.Hide(); } } ); }