Hello,
I have a simple UI where when you press a button on keyboard ‘Enter’ or gamepad on one menu, another submenu appears.
The problem is when I press the button, the new submenu appears and immediately process the input as if ‘Enter’ was pressed again.
if(Input.GetKey(KeyCode.JoystickButton0)) {
activeButton.SendMessage("PressButton", SendMessageOptions.DontRequireReceiver);
}
I need to find a way where when the new menu appear, I have to leave the button and press again to go into the new submenu entry.
Any help is greatly appreciated, thanks for advance.