daemon3000 / InputManager

Custom InputManager for Unity
Other
587 stars 88 forks source link

GetKey(String) is not implemented. #14

Closed lordpidey closed 8 years ago

lordpidey commented 8 years ago

Unity's Input class has a method with the handle Input.GetKey(string)

However, InputManager does not.

daemon3000 commented 8 years ago

I know. I decided not to include it. You're not really supposed to use InputManager.GetKey(the KeyCode version is there for buttons and digital axes) because you won't be able rebind your inputs. You should use InputManager.GetButton.

If you really need InputManager.GetKey(string) add this at the end of the InputManager_Unity.cs file:

public static bool GetKey(string key)
{
    return Input.GetKey(key);
}

public static bool GetKeyDown(string key)
{
    return Input.GetKeyDown(key);
}

public static bool GetKeyUp(string key)
{
    return Input.GetKeyUp(key);
}