How to stream multiple instances of a Level

First time delving into Level Streaming in Unreal. I wish to create a procedural dungeon generator using Levels.

I already have a system built but it currently uses an Actor as a Room, consisting of SubActors for actors inside the Room. The Room Actors are hidden and disabled on demand as you would expect.

I wish to move to a Level approach as it would make it easier to create template Rooms since SubActors are annoying to work with and should make the game more performant to run on Switch.

I can’t seem to find anything online about this situation (creating and managing multiple instances of a certain Level). Does anyone know something about this?

I don’t know about it in C++, but I assume it’s very similar to BP, in that you can load instances of streaming levels

image

( or reference ).

1 Like

Yes, this will work, though be mindful that the location offset and rotation value will be applied to the level origin. As far as I’m aware, you can’t change the “pivot point” of a level.

1 Like

Thanks for this, I’ll look into it. I couldn’t find anything with C++ but this Blueprint node looks promising. I’ll trace it back to find out what C++ function it calls.

1 Like

That node does exist in cpp as well:

ULevelStreamingDynamic::LoadLevelInstance
or
ULevelStreamingDynamic::LoadLevelInstanceBySoftObjectPtr

2 Likes