- Home /
Question by
veanhart · Mar 02, 2020 at 10:58 AM ·
ui imagerecttransformaspect ratiowidthx-axis
Get the x-axis and width of the rendered UI Image and NOT the values of the rect transform.
I have an image that need enable preserved aspect ratio and I need to get the x-pos & width of the image based on how it was rendered in the screen and NOT the Rect Transform values. I hope you understand may problem. How can I get the x-pos and width of this?
Note: I don't need to use Aspect Ratio Fitter and Content Size Fitter for this situation. I just need those values.
imageproblem.jpg
(19.0 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612224245im_/https://answers.unity.com/themes/thub/images/avi.jpg)