I have a menu screen, when no buttons are selected I use this code to select them.
public void OnNavigate(InputValue value)
{
if (EventSystem.current.currentSelectedGameObject != null)
{
return;
}
float InputPress = value.Get<Vector2>().y;
if (InputPress >= 0)
{
SelectButtonTop.Select();
}
else
{
SelectButtonBottom.Select();
}
}
However the button’s navigation picks up on the input while either top or bottom is being selected. Meaning a single press will both, select a button and go up/down at the same time.
How can I get the UI to ignore the first input up/down while no button is selected.