- Home /
Stretching 90° rotated RectTransform to the size of the Canvas
I would like to stretch RectTransform (RT) rotated by 90° so it fills full height not depending on aspect ratio - it just adjusts according to the screen size. You can think of it as full-height text label with horizontall text orientation. But my use is different. When RT is not rotated, you can simply achieve this behaviour using anchors. But when you rotate it, really weird behaviour occurs. Anchors don't get rotated. Expanding width of the screen reduces Text's width and at some point - it gets turned down so Text is no longer visible. Changing height of the screen produces similar effect. Is there any way to achieve desired effect? I need to do it this way because some screens of my game are in portrait and some are in landscape screen orientation.
Your answer
Follow this Question
Related Questions
this code doesnt work when the buttons anchor are not same(custom anchor) 0 Answers
Horizontal Layout Group making a Scroll Rect's Content rect width to be negative 1 Answer
Resizing UI Image but with minimum width 2 Answers
Positioning UI object inside screen space 0 Answers
[SOLUTION] set UI RectTransform Anchor Presets from code c# 1 Answer