- Home /
Answer by DaveA · Jun 08, 2011 at 07:38 PM
var lastStringLen = stringToEdit.Length;
stringToEdit = GUI.TextField (Rect (10, 10, 200, 20), stringToEdit, 25);
if (lastStringLen == 0 && stringToEdit.Length == 1)
stringToEdit = stringToEdit.ToLower();
that forces everything to lowercase, though... what about preventing the device from auto-capitalization, but allowing the user to capitalize if they choose
Edited answer. It will look to see if an empty input became a single character, if so, will lower it. Otherwise it leaves it alone.
Your answer
Follow this Question
Related Questions
Blurry Text using Textmesh Pro on android device 2 Answers
GUI: non-static text won't display on Mobile/Web player 2 Answers
Change the color of a label font that's using an EditorStyle.textField style? 1 Answer
Disable left/right cursor movement in TextField when pressing up/down arrow keys 0 Answers