- Home /
How do i position this text to go where i want?
ok, here's my setup.
I have a canvas, with a panel under it, and text under that.
The canvas is anchored to the topright corner of the screen, and is indented downwards by 35 pixels to give a horizontal space above it
The panel is centred on the canvas, i think theres nothing special here except the pivot
The text is anchored to the topleft (of the panel?) with transforms set to zero
now as far as i understand, with these settings the text should be ontop of the blue panel exactly at its topleft corner. However in practise, it is not, it's floating a bit above it, like this:
Without manually entering an indent, which would be horribly messy, i want that text to hug the topleft corner of the panel. So that any indent i enter would be relative to that corner, and not to whatever arbitrary point of space it's in just now. How can i accomplish this?
Answer by FortisVenaliter · May 18, 2015 at 06:23 PM
Your text uses pivot values of 0,0. In UGUI, Y values go from bottom to top. So, if you set your pivot to 0,1 and use zeroes in the positioning, it should work like you expect.
Your answer
![](https://koobas.hobune.stream/wayback/20220613195845im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Missing canvas elements on Build & Run. 2 Answers
Unity UI Text Blurriness 0 Answers