public void EnterInput(CallbackContext context) { if (!context.performed || !state2Container.activeSelf) { return; } if (EventSystem.current.currentSelectedGameObject == ipInput.inputField.gameObject) { EventSystem.current.Deselect(); connectButton.Clicked(); } }