GetViewportSize returns 0 in packaged build

Hi there,

I made a blueprint only project in 4.9.2 and I use GetViewportSize on Begin Play in my player character blueprint.
Playing in the editor it always returns the correct values. In the packaged build, however, this returns 0.

A workaround for this seems to be to delay GetViewportSize or get it on a keystroke or similar as that returns the correct value.

I assume it’s a bug?

Hey nELsOn,

Thank you for bringing this to our attention. We currently have a bug in for the order in which everything is spawned into the level aren’t always the same. This is referenced as UE-10555. It’s currently on our to do list and it’s a priority 4. A way that you can get around this issue for now is by using a delay node as suggested within your question.

Please let me know if you have any further questions, thanks!