|
I have a TextField that represents the user´s login info, a button to make the login but I also want the Return key to do the same as the button. The problem is that it will only work if I click outside of the TextField for once it´s focused, Input.GetKey(KeyCode.Return) will no longer work. I am aware of GetNameOfFocusedControl and FocusControl but I was unable to use any of those together with Input.GetKey(KeyCode.Return). Any suggestions? Thanks!
(comments are locked)
|
|
Hey there, Very similar question was answered here recently. Don't worry, there's no need for GUI.FocusControl (although you'll probably need it eventually :D) ... Hope this helps, Klep I used this Input.eatKeyPressOnTextFieldFocus and it worked as I wanted. But thanks anyway!
Mar 13 '12 at 01:10 PM
cj_coimbra
(comments are locked)
|
