I’m trying to make some camera editor helpers for my pixel game and for that I need the current size of an editor view port. What’s the way to get it?
GetViewportSize gives me (1,1) because I don’t have HUD.
I’m trying to make some camera editor helpers for my pixel game and for that I need the current size of an editor view port. What’s the way to get it?
GetViewportSize gives me (1,1) because I don’t have HUD.
Posting my solution here in case somebody will need it:
if (FViewport* Viewport = GEditor->GetActiveViewport())
{
return Viewport->GetSizeXY();
}
Also, don’t forget to add a “UnrealEd” module in your Build.cs script
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.