- Home /
Can TextMesh support multiline text?
I tried to set multiline text to a TextMesh, but nothing happened.
TextMesh textMesh = GetComponent<TextMesh>();
textMesh.text = "Hello\nWorld!";
Can TexhMesh support multiline? Is there any way to solve it?
Thank you.
EDIT:
Thanks for the spell checking :-)
The actually thing I did is a little complicated.
I load a csv file from internet (Google Drive), and parse it into json files for localization. After I found the newline symbol is missing and can't make a newline in Unity3D editor, thought the TextMesh don't support multiline text. I know I was wrong now. The problem is in the parse.
Is there anyway to close this question, or should I delete it?
It works fine, as long as you spell "GetComponent" correctly.
it's a shame one couldn't buy those misspellings and put advertisements there, like with the WWW
Define "nothing happened". The text is on one line? You don't see any text? Or what? As I mentioned, it works fine.
I'd say so long as you don't spell Text$$anonymous$$esh like Texh$$anonymous$$esh? Shit. I know it's a type-o but I have to jump in on something that Eric and Fattie have both commented on lol XD
Well, that's not actually in the code so it doesn't count. ;) Typos in actual code are far more important....
Your answer
Follow this Question
Related Questions
Mirrored text for mirror projection 0 Answers
How to save script component variables at runtime from IOS device? 1 Answer
Is it possible to italicise GUI text without having italic font? 1 Answer
How to Instantiate an editable text field 0 Answers
Using Text file with .JS code written on it in webplayer? 1 Answer