I'm creating my own input manager to allow changing control configurations in game, since there still isn't a way to alter Unity's Input Manager through script (as far as I'm aware).
I'm using PlayerPrefs to hold the keycode, and want to display the key currently assigned to an action but it displays as an int. ie, Mouse0 comes out as 323.
Is there an easy way to convert these values to something more readable to the player? I've already gathered that String.fromCharCode() is not supported.
Thank you! It was slightly off, but you pointed me in the proper direction. Such a simple solution, it completely evaded me. var kCrouch : KeyCode = PlayerPrefs.GetInt("Crouch") as KeyCode; returns an error: "BCE0006: 'int' is a value type. The 'as' operator can only be used with reference types." But, the "as KeyCode" bit is unneccesary and upon removing it, works like a charm.
– anon55397834Well, i don't use JS in the first place and normally I don't cast with the as operator. Thank you for your reply, i will change that.
– Bunny83