public void login() { if (m_EmailInputField.text.Length <= 0 || m_PasswordInputField.text.Length <= 0) { m_ErrorMessage.text = "please type an email and password"; return; } else { m_ErrorMessage.text = ""; } ShowLoadingImage(); DataLoader dataLoader = GameMaster.Instance.m_DatabaseManager.m_DataLoader; if (dataLoader != null) { dataLoader.StartCoroutine(dataLoader.AuthenticateUser( m_EmailInputField.text, m_PasswordInputField.text, loginSuccess, loginFailed )); } else { Debug.LogError("DataLoader script can't be found by LoginPanel"); } }