I created the inputs for a game, but I’d like them to be neatly ordered (I had to add a new one, and it was automatically put below all others, while instead it should logically appear on top). Seeing that users will see keys in the same order as the Input Manager shows them (if I use the default Unity configuration panel) I believe this is a very important thing.
I tried dragging an input key, but to no avail. Any suggestions? It seems impossible that it can’t be done.
Where you see Asset Serialization, choose Force Text.
If it was “Mixed” or “Force Binary” before, it will run through converting your .asset files from binary to text.
Then in your filesystem browse to your project folder > Project Settings > InputManager.asset.
Open this up in a text editor. You should see each control defined like this:
serializedVersion: 3
m_Name: Horizontal
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton:
altNegativeButton:
altPositiveButton:
gravity: 3
dead: .00100000005
sensitivity: 3
snap: 1
invert: 0
type: 2
axis: 0
joyNum: 1
You can rearrange a control by copy/paste everything between the “- serializedVersion:” and “joyNum:” lines. I would make sure to keep spacing correct. When you return to Unity, they should be in the desired order. Test your project to make sure it runs as expected.
There isn’t really a way to reorder them directly, but you can duplicate an existing input, which will cause the duplicate to appear right below the original. Then you can edit the duplicate to have the info that you want for the new control. In other words, if you had:
Up
Left
Right
and you wanted Down to appear right after Up, you’d duplicate Up, and change the duplicate to Down.