- Home /
displaying text typed in
How do you display each word that was typed into a text box on the screen?
Answer by Graham-Dunnett · Apr 05, 2012 at 03:51 PM
When you call GUI.TextField you'll get back whatever the user typed in as a string. You can do whatever you want with this string. I don't remember how to break a string into words in Unity, but Javascript has a split() function. I'd probably try using that. Once you have that then use Debug.Log to display each word, or any other Unity string display routine.
String.Split() wouldn't be needed in this case? There is no need to divide the string into individual words, just display the string as is.
Your answer
Follow this Question
Related Questions
Text Prompt Problem 1 Answer
text input without ongui? 0 Answers
Conceptual Question on Creating Arrays at Runtime 1 Answer
Array out of range 1 Answer