- Home /
How do I get more freedom with positioning UI Text?
In the inspector, under UI Text, the only options for placing text are in alignment, which allow you to place text all the way at any edge of the screen (or in the center). That doesn't work for making a visual novel style dialogue box. How can I place the UI text more freely, for example about 1/3 up the screen, close to the left edge?
Why don' you just resize and move the UI box to where it should be?
Answer by Light997 · Feb 05, 2016 at 06:08 PM
If you check the top of the inspector when you have the Text selected, you'll see a component called Rect Transform.
In the Rect Transform, you can edit where you want to anchor your text, offsets, and widths and heights.
There is a tutorial on this here:
Unity Learn - UI Rect Transform
Also check out the manual:
For a visual novel style text box (the way I'm used to them), I would anchor an Image at the bottom of the screen and stretch it over the width of the screen, maybe leaving 5 - 10 pixels of space on both sides of the box. You can then make the Text a child of the Image and stretch it over the entire box. After that, you can manually set the height of the Image.
Alternatively, you could also stretch the Image over the entire screen and leave a bunch of pixels on top, you'll have to check for yourself what you need.
Let me know if the answer helped!