- Home /
Question by
unity_1eaRQ5sNdLdnUg · Aug 24, 2020 at 12:04 AM ·
joystickkeyboardxboxcontroller
Menu not getting input on Keyboard
the input from the keyboard ,for me it work only once , when i enter new panel and go back to main menu, keyboard doesn't work anymore.It wold be really apreciate any help :)
public EventSystem eventSystem; public GameObject selectedObject; bool isButtonSelected; private void Update() { if (Input.GetAxisRaw("Vertical")!=0 && isButtonSelected==false ) { eventSystem.SetSelectedGameObject(selectedObject,null);
isButtonSelected = true;
}
}
private void OnDisable()
{
isButtonSelected = false;
}
Comment