Dears,
I am working on a new laptop 15" MacBook Pro and also using a separate apple keyboard with numpad when at home. I don’t get errors, but when using the Alpha1,2,3 as keycode, nothing happens. I also tried using the shift button with the alphanumeric keys. When using the keypad keycode, all works perfect. Also other Alpha keys like A,b, etc… work perfect.
Here’s my code
void Update ()
{
ManageState();
}
private void ManageState()
{
var nextStates = state.GetNextStates();
if (Input.GetKeyDown(KeyCode.Alpha1))
{
state = nextStates[0];
print("You pressed 1");
}
else if (Input.GetKeyDown(KeyCode.Alpha2))
{
state = nextStates[1];
print("You pressed 2");
}
else if (Input.GetKeyDown(KeyCode.Alpha3))
{
state = nextStates[2];
print("You pressed wrong key");
}
textComponent.text = state.GetStateStory();
}
Somebody has the same behaviour or a solutions to this? Should I go into the setup of the input of Unity and if yes, what do I do there?
Enjoy the New-Year full of good health and love!!