- Home /
Rearranging input order in Input Manager
Hello :)
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.
(sorry for bumping this, but I find it really important - and sadly I can't set bounties anymore with this new system)
Answer by fingersbleeding · Aug 14, 2013 at 02:41 PM
With Unity 4.2
Go to Edit > Project Settings > Editor.
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.
this needs to be chosen as the new answer to this question as this is a perfect solution, so glad they added this ability, my input list is now much more easily created/edited/rearranged
Cheers fingers!
Sorry for accepting this new answer so late, but I never got any notification about it. Thanks for the heads up
Answer by Eric5h5 · Dec 01, 2011 at 10:05 PM
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.
Oh, sigh, can't believe it can't be done. This is a mess mostly because I have a LOT of inputs, and I add/change them the more I go on. But thanks a lot for the trick: I didn't realize you could duplicate the inputs, and I'll use this as a workaround.
Yeah, they should of used X$$anonymous$$L or even Json.
Note: In order to duplicate a member of the array, you have to use the Edit -> Duplicate option from the top toolbar of the program.
Not super intuitive.
The input manager UI is kind of primitive, I hope unity does some work here in the future. Or maybe people are using external tools to modify this stuff? Perhaps it just exports an X$$anonymous$$L file or something and people just edit that. Seems like it would be easier to just edit a text file rather than use this UI.
I reckon you can probably reorder it with 4.2 by manually editing the Input$$anonymous$$anager.asset file, since it's now text-based, ins$$anonymous$$d of binary.
Your answer
Follow this Question
Related Questions
Is there a way to detect a change in Control Scheme with the new Input System? 1 Answer
Input Debugger has duplicated devices and it is overriding game input actions 0 Answers
Adding extra axes to the input manager programaticly 3 Answers
Get Array of all Input Manager Axes 2 Answers
Get axis input only from certain keys 2 Answers