I wrote some basic C++ callbacks to help my development.
But some weird thing I discover:
On Android platform, the value of these call:
GEngine->GameViewport->GetViewportSize( );
GEngine->GameViewport->Viewport->GetSizeXY()
could be (0,0) when the game is just started.
This is triggered by applying a default hud, which call these function early when game mode is set.
Is there a better approach to obtain viewport size?
I really appreciate your input, but allow me to ask for more details.
I just modified the HUD blueprint to receive a updated size from the default pawn class blueprint,
where I believe it is what do you meant by “the local player.”
The HUD received the right input size in PIE, but not in physical Android device again.
( still (0,0) vector from “get view size” in pawn blueprint sent to HUD.)
Is this what you meant by “the local player”? Or it is somewhere else?
Please allow me to ask for you help again. Thank you.