Creating levels from code

Hello dear Unreal Community,
Let this be my first post. I’m rather new to Unreal but a few years experienced c++ programmer. I wish a few advices from people who swim in the engine’s code.

What I want to achieve?
I want to have 50-1000 levels and they need to be separate levels, all generated from code. No, it can’t be one level and it cannot be generated manually. I need a script that will create 50 levels, add a few meshes into each and bake lighting for all the levels. The reason they have to be separate levels is they will be very big with lightmaps and each will have lots of data inside so for the performance reasons they need to be separate.

Where should I start looking for level creation from code and level hierarchy’s scene modifications? Can I run Lightmap building from code, too?

I already have a script that loads the next level once I’m close to it and unloads the previous levels.

P.S. Is such thing achievable via visual blueprints?

Hi there!

I know its not exactly what you’re looking for, but I have a good start for you to see how to dynamically load a level that you’ve created.

This is my Load Level Instance BP node!

Source code is in my Victory Plugin download.

Rama