For my project I’ve set up two action maps. One for player controls like movement and interaction, and one for when UI is up, like having the esc button close the window. On interaction (from actionmap A), I enable and subscribe a function to an action from actionmap B. Both these interactions use the ‘E’ button on the keyboard.
The very first time this happens, the action from actionmap B is immediatly triggered on subscribe, after I’ve essentialy pressed the ‘E’ button. Any subsequent time, this action is not triggered (which is what I would suspect to happen).
I’ve tried to debug it a bit, and it seems that in InputManager.cs, in FireStateChangeNotifications, the array of ‘signals’ can change from within NotifyControlStateChanged(), eventhough the comment would suggest otherwise. On the first occurence, the iteration is on index = 4, and it does come across the changed action map later in the for-loop. On any other occurence, the same function seems to be later in the for-loop, and does not come across the changed action.
The comment in question:
What is the expected behavior here? Is this what is supposed to happen? Or is this a bug?
I’d like to include the ‘E’ in my second action map, but this behavior is undesirable, and as far as I’m aware there doesn’t seem to be an easy way to figure out of the input was triggered on the same update as the action map was enabled.