public void Update() { Debug.Log("Primer if" + Cancel.ToString()); if (Cancel == true) { bool A = canvas2.activeInHierarchy; bool R = false; if (A == R) //canvas2.activeSelf.Equals(false) { canvas1.SetActive(true); Jo++; Cancel = false; Debug.Log("Final if" + Cancel.ToString()); } } else { Debug.Log("nada pasa"); } if (Jo == 1) { JOP.Creartxt(); Debug.Log("Se envio"); } }