Is there a reason why:
if (Event.current.type == EventType.KeyDown && (Event.current.keyCode == KeyCode.Enter || Event.current.keyCode == KeyCode.Return))
doesn’t work anymore?
I get the following error message, even though all over the forums ppl say this worked for them:
BCE0051: Operator ‘==’ cannot be used with a left hand side of type ‘UnityEngine.KeyCode’ and a right hand side of type ‘System.Object’
What the hay?
p.s. i’m using it to detect input text “return” key inside a text field, so i can’t use any other input detection method that i know of.