Help - UI Single Line Alignment

Im working on an ‘update message’ for a game, introducing changes and additions in it and such, but i stumbled into a problem i do not know if its possible to solve, or at least i do not know how its done.

I need in a text consisting from 1 to lets say 100 lines of information, and in those lines, i need only some of them to be centered and different in size compared to others(like a headline or an important feature), but i have no idea how to do it.

The only commands for manipulation i know is for changing color, bold, italic, and some spacing-- but none of them help for my ‘not centered in the text box’ problem.

Any help would be an enormous amount of helping me out with this probably simple but impossible solution for me to wind! :slight_smile:

Cheers

Are you looking to use a single text object to contain all 100 potential lines and for these individual lines to be aligned differently? I guess something similar to the image below?

I cant seem to see the image, but what i guess its what you said: i need to be able for one line to be able to be aligned differently compared to other lines

A picture is worth a thousand words. Here is a link to the image

Unfortunately, Ui.Text only allows you to align the entire content of the text left, center or right but not individual lines. However, control over alignment of individual lines is something that TextMesh Pro easily handles as shown in the image. Control over alignment is done by using the <align=left> or <align=center> or <align=right> or <align=justified>. There is also a tag to control margins and width as shown in the image below.

Yep, thats pretty much what i need for my text-- but sadly i need to use the unity UI and am limited to a 0$ budget :wink:
I guess i will be making some sacrifices!
Thanks anyway

TextMesh Pro is designed to replace the Ui.Text component and as such works with Unity UI and Canvas system.

Yes but ive already said my budget is none :wink:

I got that part. I was confirming the working with the New UI part. :slight_smile:

Fair enough :smile: