- Home /
Need tip on better UI.Text control to control the paragraph alignment using tags.
I tried UI.Text with RichText option, but this control cannot provide paragraph alignment which is something I need the most. It is good to set the color for the text, and to make the text bold, italic, ...
I would need to align certain paragraph to the left, while the other need to be centered.
I checked the TextMeshPro, but I would like to avoid that.
So I am asking for any suggestions and tips if there is something that can output the basic HTML. All I need are bold, italic, color tags and most importantly the tags to align the paragraph.
Because it adds about 3$$anonymous$$B more to the .apk file, and I would like to use out-of-the box solution if possible.
There is no "out-of-the box" solution. The rich text features of Unity are quite limited. If you want text alignments, you can use multiple Text components with the alignment
you want.
If you don't want to use Text$$anonymous$$eshPro, you will need to develop your own solution or find / buy an asset on the Asset store for instance.
Answer by Tobychappell · May 22, 2018 at 12:32 PM
Build the HTML inside an XDocument class and then call ToString();
Yes, this answer is not related with the question.
Apologies, I was focusing on the "something that can output the basic HT$$anonymous$$L."
Your answer
Follow this Question
Related Questions
Unity iOS Android: open local HTML in Browser 1 Answer
Open a local html file in the Android's default browser 1 Answer
Can I display an Unity WebGL Game in Unity Editor ? 1 Answer
How to access a text file once it's on Android Device so I can read it. 1 Answer
Disabling/enabling canvas component causes weird text/font problems on Android 1 Answer