DonnieDarko
(Lionel Fleuret)
February 2, 2015, 10:46am
1
Hello,
I am working on an Input Manager for my game and the following code is working in the editor, but not in the standalone version of the mobile package (Android Samsung tablet):
const FVector2D ViewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY());
My question is : How can I get the viewport size in the standalone package of the mobile device ?
Thanks for your replies !
Lionel
polytopey
(polytopey)
July 31, 2015, 6:01am
2
It’s been 5 months, and this bug is not fixed yet, this is EPIC!!
Cache extents from a DrawHUD function?
If you get the centre of the Canvas and double it that should be your window extents.
This works for me on iOS, not tested on Android yet.
void AMyAwesomeHUD::DrawHUD()
{
Super::DrawHUD();
if (!Canvas)
{
return;
}
float fCentreX, fCentreY;
Canvas->GetCenter(fCentreX, fCentreY);