Hello!
Can someone help me, please?
I am trying to make a slate brush from texture and size it to viewport.
So i bound a brush to an image in widget settings, inside function i cast to image refference, then i get a viewport size and make a brush from it.
But it results some strange sizes of an image.
What am i doing wrong?
Had a similar problem recently: are you calling your code immediately on game start\begin play?
If so, from not very deep analys i concluded that viewport got initialized kinda slowly.
I don’t remember exact details, but i’m ended up with waiting until next condition to be satisfied before attempting to use viewport size
While this, probably, can solve you problem, i hope someone can enlighten me about details\better solution
Omg!
It does work now!
The solution was in the nodes you use.
Though i don’t get what is the difference between GetViewportSize and GetViewportWidgetGeometry in this case, but it DID work.
Thank you very much! I have been struggling with it for two weeks.
P.S. About viewport size - i don’t call this code on begin, but i compared viewport sizes on BeginPlay and on a bound key after - it was the same.