private void Update() { if (Mathf.Abs(stick) < stickDeadzone && dpad == 0) { selectable = true; } switch (navigationType) { case NavigationType.Vertical: stick = Input.GetAxisRaw("Left Stick Vertical"); dpad = Input.GetAxisRaw("DPAD Vertical"); break; case NavigationType.Horizontal: stick = Input.GetAxisRaw("Left Stick Horizontal"); dpad = Input.GetAxisRaw("DPAD Horizontal"); break; } if (!selectable) { return; } if (stick >= stickDeadzone || dpad == 1) { ChangeSelection(1); } else if (stick <= -stickDeadzone || dpad == -1) { ChangeSelection(-1); } if (Input.GetButtonDown("Confirm")) { currentlySelectedButton.Click(); } }