Checking if player is typing in an InputField

Hi!

I only really post here if I’m really desperate (spoiler alert - I am)

I’ll get straight to the point - I’m using a lot of “Input.GetButton” things but I want them to be ignored if the player is typing in an InputField

I don’t know much about the new UI, I tried fiddling with the “IsHighlighted” thingy, the EventSystem’s “currentSelected” but I didn’t accomplish much. I want to ask if there’s an easy way to know if the player’s typing in an InputField.

Thanks in advance :smiley:

Hello! This might be a bit late, but there is something called Inputfield.isFocused, which should help you.

you can use
void Update()
{
if(inputField.isFocused && Input.anyKeyDown)
{
Debug.LogError(“hey is typing”);
}
}