I created a custom widget then placed it inside a Canvas. I use Size To Content for the widget. Then I need to get the size of the widget to calculate new position in the Canvas (inside a viewport) whenever it is shown.
However, if I use GetSize from the UCanvasPanelSlot for the widget, I got the value that specified in the Details (Class Default) panel (Size X and Size Y). The size of the widget, of course changed dynamically. But the GetSize() value always return the same value.
How could I get the UCanvasPanelSlotSize that is Size To Content?
Never mind. Apparently the Geometry in NativeTick, stored the runtime data of the widget. It knows what its current size. So, each time it has different size, just update the size variable (custom variable) inside the widget and use it whenever needed.