- Home /
Detect the return key whilst using a text field
When the player is done typing what they want into a gui text field, I want them to press the return key which will then tell the script to place that string into another variable, the problem is, when I try to press the enter button, the script doesn't detect this but it will detect it if I click outside the text field, why is this? How do I get around it?
It would be great if we could see the code you have for this, it makes it a lot easier to help you out. Although the problem is probably that you are using Input functions which does not work in OnGUI(), you have to use Events.
Your answer
Follow this Question
Related Questions
making bold word or coloured letter in a string, 2 Answers
Help! Iphonekeyboard has only number appear in textfield 0 Answers
Using GUI.FocusControl on TextField selects all text 4 Answers
Use specific TouchScreenKeyboardType for different text fields 3 Answers
How to speed up TextField input? 0 Answers