Center SViewport inside SWindow

I have it so the GameEngine.cpp renders the GameViewport separately from the window size so I can give access to having the resolution scale up pixel perfectly.

Now I’m stuck. The viewport is rendering on the upperleft hand corner. I’ve learned slate, but I can’t see how to align the GameViewport to the center H/V of the swindow. Help!

Can I use slate code in GameEngine.cpp? Do I have to create a Canvas and set the Window content to that, then set the canvas content to the viewport? Or am is this that much more complicated? I know HAlign and VAlign doesn’t work when directly interfacing the SViewport. Maybe it can be cast as a Canvas like in blueprints? I’m way out of my leage. lol

This is the only obstacle I’m facing. Once I can do this, I can scale the viewport in multiples based on a resolution variable I set through the Editor (So other projects can utilize the system). I’m still learning the ins and outs of the UE4 source engine, but I’m getting there. just don’t know what can and cannot be done with the current approach yet.

The above is a 700x400 viewport, with a 1280x720 window. I need to figure out how to center the viewport (ViewportWidget?) in the window.

Take a look at FSlateApplication, that may help…