I am trying to get the width of an element inside VerticalLayoutGroup
VerticalLayoutGroup
var width = (element.transform as RectTransform).rect.width;
but I am returning 0 as it is RectTransform driven by auto layout. How to measure the runtime width?
0
RectTransform
Edit
I am trying to scale a RawImage
RawImage
No one has answered this question yet
Check out similar questions: