Remapping of keyboard keys on the fly?

I’ve done a few searches, but can’t find a definite answer on this. Maybe someone here can help me.

I have a series of keys that are defined in a game, such as Forward, Backward, Left, Right, etc. These are mapped to W,A,S,D by default. I am looking to allow a user to map any key on the keyboard to these actions through a menu system. Basically I want to remap the keyboard in game, via a menu system instead of when the game starts (before it actually launches). Is this possible?

Example:

Everytime I press W, the user moves forward. The user brings up options and wants to map Forward to ‘R’. How would I do this with some sort of Input function (Input.GetButton ???) when I don’t know the button name of the key the user has pressed?

I have the facility for a user to input a key (it’s through a menu) but I don’t know what Input function to use to capture this keystroke.

Thanks.

Response from Aras Pranckevicius in this Thread:

http://forum.unity3d.com/viewtopic.php?t=2458&highlight=input+change

The only way to do this (as of now) is to bypass the included button settings entirely. I do this in Botbuilder, but only because its controls are so nonstandard that attempting to fit them into the standard mold would be an exercise in futility. In general, it’s not a good idea.

Typically, using the built-in method for redefining controls when you launch the game should be enough anyway. (Although I think Windows builds still don’t have this?)

–Eric

I believe redefining the controls is something quite essential to any good game. Or at least a great commodity.

What I dont understand is why exposing the input settings would be an issue in the first place.

There is no issue (as in a technical hurdle) as far as I know. The only issue is that it actually needs to be done by some of OTEE’s developers. Features don’t just show up by themselves. :slight_smile:

You should work on that! =)