So I’m trying to migrate my input rebinding UI to the ‘Enhanced Input’ plugin and ran into a snag.
I wanted to organize the Input Mapping Context so that I could pull everything in as one array (Get Mappings), but I’m noticing the list comes in is out of order. I think, in exactly the order in which I added each key, because I went back and added additional inputs to these and since then it’s look wrong.
So, I don’t want to redo the entire Mapping Context to fix this, and even if I did, I definitely will change something eventually, and have to do it all over again.
I feel like I’m missing something here, is this a bug?
Do I have to build a whole other list to organize these?
Nodes like ‘Map Key’, ‘Unmap Key’, and ‘Unmap All’ will permanently remap the input mapping context in much the same way that the default input mapping works. It will also place the new input mapping at the bottom of the list. So the solution to this issue, as far as I can tell, is to build a list with your preferred order, make an array of keys and bindings, reorder based on the list, and then rebuild that whole structure.
It’s worth noting that the node ‘Add Player Mapping Key’ seems to only be modified per game session, so if you wanted to keep your Input Mapping Contexts from being accidently modified, you could use that node when loading settings. I haven’t tested this extensively however.
For future searches, because I just found out myself, after searching for it:
There is acutally a fixed array which describes the order.
You can find it by switching to property matrix (upper right corner in input mapping context)
Unfortunately you cannot re-order it there, but you can insert/duplicate items, which can be used to create it ordered…
For me I only needed to adapt 2 entries so it was not that much pain, hope this helps
Dragging and dropping with the handle on input actions in the IMC should reorder the the mappings array. Just did it in my own project. I had added new mappings to an existing action and they were showing up at the end. I think moved that entire action by dragging it and all it’s actions were now showing in the correct order, next to each other.