Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetButtonDown("Cancel"))
     {
         if (MaterialTextField.IsEditingAnyTextField())
         {
             return;
         }
         if (MaterialDropdown.IsEditingAnyDropdown())
         {
             return;
         }
         if (!GetComponentInParent <CanvasGroup>().interactable)
         {
             return;
         }
         MenuSfx.instance.PlayBackSound();
         GetComponent <TransitionToPanel>()?.Invoke();
         GetComponent <TransitionToScene>()?.Invoke();
     }
 }