1

I have added an image as a canvas child, the image is just a layout to outfit UI text elements like in below image.

enter image description here

here the black outline is the image and red one is their bounds which we can see in editor, the blue text is UI Text element with anchor preset bottom stretch and right = 100. The canvas render mode is screen overlay, scale with screen size, reference resolution is 1920x1080. Thus in image 1, the UI text is in middle, but in image 2 (different resolution) it does't look like in middle.

0

1 Answer 1

2

You need to set Text anchor preset to bottom-center to achieve that Text is always in the middle-bottom of the screen.

This manual is a great Instruction of how you can position UI elements relative to the Canvas and each other.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks man! The issue got fixed. But I didn't need to change text anchor, I just changed layout image (the black one) anchor preset from stretch x stretch to middle x center, that way it did reset layout image's anchor to center and now all UI text elements that I am placing in same parent are at the same position irrespective of resolution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.