Using UE5 Graphics Engine with External Graphics Engine

Hi, I have an existing game/simulation engine. The graphics engine is very old. I want to utilize unreal engine’s graphics engine, but keep the architecture of my current engine. I can’t find a lot of resources to help me determine if UE5 allows that integration. I specifically want to use UE5 to render an environment (a level), then use my own engine to render 3D objects into that environment. My engine has direct support for this, but I can’t determine if UE5 has this support.

I found this: https://docs.unrealengine.com/5.0/en-US/building-unreal-engine-as-a-library/. It tells how to build a UELibrary, which is great. But, I can’t find any documentation that’s helpful with accessing the graphics engine.

Does anyone have experience with this? Is there more documentation somewhere that would be helpful?

I haven’t head of anyone doing exactly that. I don’t think the engine is meant to be used that way.

Depending on your use case, you might want to consider making some API so that your engine can tell UELibrary what it wants, and Unreal can spawn those things in its own world to match.

Otherwise, you’re probably going to be dissecting the engine yourself and modifying it to remove things like physics and other things you don’t need. You have the source code, but unexpected issues may arise since AFAIK it wasn’t designed for that.

1 Like

I assumed I would have to use the UE Editor to build out my environment and to provide a viewpoint (camera) as well as some 3D content. I don’t want to remove the UE5 features. I essentially want to have UE5 render to a render target, then we will draw our view from our engine on top of that.

UELibrary requires a window handle and windows messages to be passed to it. So, I’m assuming this can be done to some extent. Does the ‘tick()’ function in UELibrary drive the rendering or just the actor updates?

I haven’t worked directly with UELibrary, but based on the documentation it sounds like it calls UEngine::Tick

(Looking at the code, that’s a virtual function, so maybe also check out UGameEngine::Tick to see the order of everything that happens )

Edit: As the comment on that function says “Update Everything” is what it does. Physics, graphics, gameplay logic, particles, inputs, and definitely not in that order