I have made a custom widget and want to get the size of the entire widget that’s placed in a different widget dynamically within a function in the widget.
Eg: I created a general widget for my game that contains an image, I want that image to center fill to the maximum width/height however to do so I need the size of the widget when it’s placed in another widget. So far I have a function within my general image widget which takes a Texture2D and a Size parameter. The size of the widget when created is passed into the function from another widget and would like to avoid the need for this and just get the size of the widget within the widget itself.
I read somewhere that it’s not possible until you wait for a single Tick, is this true? Could someone post an example of getting the size of a widget within a function of that widget please?