How can I get the size of a widget in UMG?

Hello, libohan1312

To do this, you can use UUserWidget::SetDesiredSizeInViewport function:

UFUNCTION(BlueprintCallable, BlueprintCosmetic, Category="User Interface|Viewport")
void SetDesiredSizeInViewport (FVector2D Size)

Hope this helped!

Good luck!