I am using c# and am stuck working on the keybindings. As of now I am using:
void OnGUI (){
Event e = Event.current;
if(e.isKey)
{
keyboard.keys[num] = e.keyCode;
}
keys is a keycode array and keyboard is another script that has that array. For the controls them selves I want to be able to use keys[1] as the keycode but am not sure how to go about doing that. I thought that this would work but it doesn’t:
if(Input.GetButton(keys[1]))
any ideas on what I need to do?