- Home /
Question by
Atto2O · 14 hours ago ·
keykeyboard input
How to use NewInput System for open/close menu with same key (ESC)
How to use NewInput System in order to performe the action open and close with same key(ESC). Both CallBacks are called at the same time and the menu does not open.
void Start () {
gameKeyController.Menu.Back.performed += _ => GoBack();
gameKeyController.Default.OpenMenu.performed += _ => OpenMenu();
}
public void GoBack()
{
escapeFunctionality();
}
public void OpenMenu()
{
if (!GameManager.Instance.getAnimationMenu().isBlocking())//WILL BE ESCAPE
{
if (...)
{
menuInGame.SetActive(true);
}
}
}
Input System Version 1.0.2 - January 21, 2021
Comment
Your answer
Follow this Question
Related Questions
Key Movement (and other) Event System 0 Answers
Changing Rate of Change from Key Key Input Values 1 Answer
access Input.GetButton key name 1 Answer
[ASNWERED] How To Change Button To An Alphabet Key 2 Answers
GUI Box Doesn't stay open 1 Answer