- Home /
How does "Input.eatKeyPressOnTextFieldFocus" work on compilation ?
Hi,
I've a pretty weird problem when trying to allow the Return Key while the user is typing in a TextField : what I want to do is avoiding him having to click on the Log In button.
Looking at the various answers given on the site I saw that the command line
Input.eatKeyPressOnTextFieldFocus = false;
could be used in order to allow Keys to be used in TextFields.
For now it works well be the problem I have is the C#-MonoDevelop tells me this command line is obsolete. But without it I can't manage to use Keys in TextFields. The weird thing is that after compiling the whole project once it works even if I delete the line :s
Long Story Short :
the Keys input don't work in TextFields
I add the command line "Input.eatKeyPressOnTextFieldFocus = false;" and it works well even if it tells me that this command is obsolete
I can remove the line and compile again and it still works
if I close the project and re-open/re-compile it the Keys input don't work anymore: I have to compile another once with the command line
I really don't get how this can happen so I hope you guys could give me a hint :D
Answer by unimechanic · Jul 03, 2013 at 04:03 PM
This example might help:
http://forum.unity3d.com/threads/188202-Simple-dynamic-list-editor
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Mobile Keyboard hide on tap screen. 2 Answers
TextField plus Return Key issue 2 Answers
(C#) A better way to limit actions to once per button press? 2 Answers