// Update is called once per frame void Update() { if ((!alreadyPressed && MyInput.GetPause()) || (MyInput.GetUnpause() && _paused)) { alreadyPressed = true; if (_paused) { Unpause(); } else { Pause(); } } else if (!MyInput.GetPause()) { alreadyPressed = false; } MyInput.updateController(); switch (MyInput.getControllerType()) { case (-1): psControls.SetActive(false); xboxControls.SetActive(false); keyboardControls.SetActive(true); break; case (0): psControls.SetActive(false); xboxControls.SetActive(true); keyboardControls.SetActive(false); break; case (1): psControls.SetActive(true); xboxControls.SetActive(false); keyboardControls.SetActive(false); break; } GameObject.Find("EventSystem").GetComponent <GUI_FirstSelected>().setSubmitButton(); GameObject.Find("EventSystem").GetComponent <GUI_FirstSelected>().setCancelButton(); }