// Update is called once per frame IEnumerator Toggle(CustomButton buttonPressed) { foreach (CustomButton b in buttons) { if (b != buttonPressed) { b.Locked = false; } } yield return(null); buttonPressed.Locked = true; yield return(null); Debug.Log("pulsado"); buttonPressed.ClearContactTracking(); }