I found a solution I thought really good, but some weeks later the solution was found to work only in editor mode when I tried to package.
I have a UMG with custom size 1000x100. I need the design size to dynamically arrange my widget component’s position.
UUserWidget::DesignTimeSize much meets my needs, but it works only in editor mode.
I tried to get the canvas’ geometry, but there are two problem:
- the geometry is not ready before I place it;
- the size I got from GetLocalSize() is the DrawSize of the widget component, not the UMG’s design size.
What’s the proper way to get the UMG’s size?