So, what happens if you add multiple input mapping contexts with the same priority? Do they conflict?
HI @AllGamesSuck ,
If you add multiple Input Mapping Contexts with the same priority in Unreal’s Enhanced Input system, they don’t automatically conflict. All mappings are combined, and the inputs from each context are valid at the same time.
The issue comes up if two contexts assign the same key to different actions. I just ran a test using 5.6.1, where I created two IMCs with the same priority — one with the basic controls and another one swapping the up and down keys to work in reverse and it seems that the IMC loaded last is the one that ends up taking priority.
IMC_Default
IMC_Test
For example, if IMC_Default is loaded first and then IMC_Test, both with the same priority and same key bound to different actions, IMC_Test takes priority because it was added second and therefore loaded last.
If I switch the order and load IMC_Default last, then it’s that one which takes priority over those keys.
I also remember seeing in a post that in some specific cases both actions can actually get triggered.
This is what the official documentation says:
Here’s the official documentation where it explains this
Hope it helps!
Thanks. But what if you add the same mapping context multiple times with the same priority? Does it create duplicates?
If I’m not confused, if you add the exact same Mapping Context multiple times with the same priority, they all get called but no duplicates are created in the input stack, the subsystem ignores the extra calls
Just a heads up here: I tested it myself, and if you have 2 different mapping contexts and you add both with the same priority, the last one takes precedence, yes. BUT, if you add the first one again (wanting to change the mapping context to the first) it doesn’t work. The second one is still active.
The solution for me has been to clear all mapping before adding the one I want to be currently active.
Would be nice if you could change priorities on the fly, but for now …



