- Home /
guiText.text could this be word wrapping?
I do not know how to wrap this codes for the GUIText could any one please show me how? This code make my text typing from left to right but I need it wrapped so I could write more words for my game so please show me how? This code original from wiki.
/////////////////////////////////////////////////////////////////////////////////
var letterPause = 0.2; var sound : AudioClip;
private var word;
function Start() { word = guiText.text; guiText.text = "" ; TypeText (); }
function TypeText () { for (var letter in word.ToCharArray()) {
guiText.text += letter;
if (sound)
AudioSource.PlayClipAtPoint(sound, Camera.main.transform.position, .66);
yield WaitForSeconds (letterPause);
}
}
Answer by Rennat · Dec 02, 2010 at 06:36 PM
Word Wrap is a property of GUI Style, read up on how to implement GUI Styles here
http://unity3d.com/support/documentation/Components/class-GUIStyle.html
Your answer
Follow this Question
Related Questions
HELP! Make text appear in scene after 5 seconds? 2 Answers
How to display EULA from Doc in Unity? 0 Answers
How to approach GUI button controlled animations and GUI text? 0 Answers
using tow gutext in the sam scene 0 Answers
Getting pixel perfect text with either text meshes or GUI Text on a worldspace canvas 0 Answers