Render UE4 graphics into another game

Hello,

I have created a simple game which uses my custom LineBatchComponent to draw two lines(I am attaching screenshot in order to check it)

Now, I want these two lines to be rendered into another game which is running on DirectX11. The reason is because I have requirement to use the UE4 in order to draw something in the other game.

What I expect to happen is the following - use the RHI in order to get the D3D11 device. Use this device to capture the swapchain and the buffers of the running game. After that just run the game(my game not the other one).

I thought that a DLL injection could be performed in order to inject the UE4 game(which I created) into the other game. And to execute the game’s rendering code in the main method of the DLL. The problem is that I do not have experience with the rendering part of the UE4 and do not know how to achieve this at all. Any help here is welcomed.

Something more, I want to use the UE4 because it is taking most of the heavy logic for drawing and rendering. I have implemented some D3D11 hooks(using custom swapchains, vertex and index buffers and shaders) before and if I have to implement the logic for the drawing it would be a lot of pain.

Thanks,

Sounds like you want to make CHEATS!!!

No cheats. It is intended to be used for making additional lines in the other game. These lines will help the player orientate in the game but will not help him compete better. It will be left the player abilities to compete in the best possible way.
Giving example, these lines will be used as a compass in the game to know where the player is moving(east, north, south or west). And this will not be used as cheat :slight_smile: