public void Logout() { loginScript.ClearFields(); if (mainBackButton.activeSelf == true) { mainBackButton.GetComponent <MainBackButton> ().BackToPrevPage(); } if (mainBackButton.activeSelf == true) { mainBackButton.GetComponent <MainBackButton> ().BackToPrevPage(); } animator.SetTrigger("Open"); }