gameplayState.Pause; instantly changes the inputmap to UI. However, UIPauseAction then fires causing pauseState.UnPause. This results in the game going gamplay->Pause then returning back to gameplaystate despite pressing ESC once. From what I understand, InitialStateCheck is suppose to prevent this, not firing the event if the action map(UI map in this case) wasn’t active at the moment the button was pressed. However I get an error instead:
(not the exact issue you’re describing, but a similar due to the same button input being read twice - hopefully still helps someone)
Crazy that no one has a solution to this. I’m running into the same issue. And it only happens the first time for me. It takes two “esc” presses to open the menu the first time and then on subsequent presses it works fine. Which is a mystery.
Basically because I was switching action maps and both action maps use “esc”, it got triggered twice on first press - THE FUCKING MYSTERY IS WHY DOES THIS HAPPEN ONLY THE FIRST TIME…
This works because my ShowMenu is called in one frame with “esc” and then the coroutine makes the action map switch in next frame, where the “esc” isn’t read a second time.