Hey folks,
I’m trying to build a runtime editor (think like a simple level editor that runs in-game) and I’m stuck on the window layout part.
The Problem:
Right now the game viewport takes up the whole window. I need it to only render in part of the window so I can have UI panels on the sides - basically like how the actual UE editor is laid out with the viewport in the middle and panels around it.
What I’ve done:
Been digging through UGameViewportClient code trying to figure out how to make the viewport smaller and put it inside a Slate container instead of taking the whole window. Looked at CreateGameViewportWidget() and some SViewport stuff but honestly getting pretty lost in all the Slate hierarchy.
Questions:
- Has anyone done something like this before?
- Do I need to completely override UGameViewportClient or is there an easier way?
- Should I be messing with SWindow directly or working at a different level?
I found some editor code that does similar things but it’s all tied into the editor framework and I can’t figure out how to adapt it for runtime.
Anyone have experience with custom viewport layouts? Even just pointing me toward the right classes would help a ton.
Using UE5, C++ project, Windows.
Thanks!