Canvas adjusting position of elements depending on res.
I'm following a Unity tutorial, but it is really outdated - i'm making it work, but there is one thing that won't work at all. I want to make a canvas element stay in the corner of the screen, but it will be exported for lots of resolutions, and android (i want it landscape only)
If anyone can help, it will be appreciated.
Answer by Infenix · Feb 01, 2020 at 09:24 PM
You have a setting called anchor on each components of your canvas containing a Rect Transform, I think that is what you're looking for. By default, all anchors are set to the middle of the canvas. You can use these anchors to stick to the axes you want (red lines), and also to resize themselves on chosen axis (blue arrows). I also recommend to use TMPro if you need to write text, so you can make the text auto resizing between defined size, choosing the bigger it cans without getting out of the box.
Your answer
Follow this Question
Related Questions
My canvas is in the scene but not on the camera [SOLVED] 1 Answer
What would be a better way to achieve this effect? 0 Answers
How would I display text on an in game screen? 1 Answer
How to draw android view on Unity canvas? 0 Answers
Unity UI elements flaky texture glitch on Android Builds 0 Answers