- Home /
Rotating and scaling UI image messes up anchors?
I have a UI image and when I assign a texture to it, I want to show it in a certain way:
I can not rotate the original texture cause the UI Image is only a presentation for the actual object, which is a plane because I need to make complex effects which sprite renderer cannot support. However, the plane actually renders the object as shown in the third picture, while the UI Image renders it as shown in the second picture, so I need to rotate the UI Image element so it actually depicts what the plane will render.
While doing so kind of works, it messes up with my anchors because the Canvas now sees the height as the width and vice versa. Before rotating it, I could anchor it so that the height scaled with the screen's height while the width stayed fixed, after rotating it it stretches the width instead while the height was fixed. I tried adjusting the anchors in so many ways but nothing worked.
Any help would be appreciated.
Your answer
Follow this Question
Related Questions
Unity 2D not rendering images in Canvas 1 Answer
Ui image appear and disappear on trigger 1 Answer
Image on UI doesn't stretch when objects it's on is stretched. 0 Answers
Instantiating Image makes whole Canvas disappear in Playmode 1 Answer
Can a material only be used for objects and not a UI canvas? 0 Answers