Download

Delayed UI resize required?

I have a game that’s needing its UI resized to fit with various screen resolutions (for mobile, if that matters). I’m currently using a similar technique that the gameScreen in the match3 example is using - grabbing two actors’ locations around my 2d grid so that I can use their screen location and put that into spacer widgets in my UI to resize the gameScreen.

Now match3 is doing this after the event construct on the UI, but it has a delay right at the start of this function call. Why is that? It seems to not work if it’s not there as it’s flakey the shorter the delay is.

If Epic is doing it this way it must be a good way to do it, but it seems hacky.

Is there a better way to deal with this? And why was this option used?

Thanks for any input or help.

a14c133c512183e2eba182ad398d71adb14c27fc.png

This is the call I’m wondering about, again - the event construct inside the GameScreen. The delay is right afterwards, it’s causing a pop when you play it in the editor and is what I’m wondering how you’d make this section better, and why it’s delaying in the first place.