UE4 window within application window

Hi,

How do I achieve this? It doesn’t sound straight forward as I have scoured down forum post, wikis etc but I cannot find out how. To be precise, below is the application layout that I want to achieve:

viewport.png

Well you can use Slate to make your own “application window” and have the game viewport embedded in it (like the Editor), but actually wrapping a game viewport in some third party window sounds painful. That’s how it was done in UE3 with wxWidgets, and there’s a reason they’re not doing that now.

Yes I plan to do it in MFC, but in my search, it seems no one is using MFC with Unreal. My old code (with open source graphics libraries) are all using MFC, and displaying 3d scene in any designated window is a piece of cake. I have to admit that it frustrates me quite a lot - it is complicated for something simple.

This really isn’t a simple request. Anyway, I think where you may want to start looking is FViewport. This is likely fairly close to the platform. From there you can do some investigation and figure out how to launch the game/engine from your application and embed the viewport in your app… Or something.

Thanks for the reply. Alternatively, I will need a C++ code snippet of running Unreal game engine loop. And have the RTT always updated in loop and then have this render texture be displayed in my window.

Any answers to how to do it without Slate?

This topic is very interesting! It will be great to build this kind of application, I mean, not a game look-like, but more a desktop look-like application which is more compliante with industrial requirements. Some customer want to have a “standard desktop application” : no fullscreen, resizable, iconizable, etc… A typical desktop application with the power the UE4… like the editor. Anybody already do that ?

You can do it but you have to delve into the UE4 sourcecode - I did it by passing a command line parameter of an HWND and in the window creation code, made the UE4 window a child of the one passed in.

Did you have any problems with mouse positioning and mouse dragging? I could reparent the Unreal process window using Qt parent, but I have some issues with the inputs.