Need to change the persistent level

so it looks like the best way to do things is to have your persistent level pretty well empty, then load other levels as needed.

unfortunately, my persistent level is now chock loaded with a million polygons of carefully placed foliage. this would be fine if unreal engine didnt try and load the persistent level each time and bring my graphics card to a grinding halt.

the solution it seems would be to “de-persistenize” my current persistent level and only load it when i need to. however, I have not been able to google a solution on how to do this.

i tried copying the persistent level object to a new level, but all you get is an exact copy of another annoying persistent level.

i tried to create a new blank level, copy everything out of my existing pers. level, and paste it in, but it doesnt copy foliage when you do that.

thanks for any help.

so obviously i am still unclear about some of the concepts here.

in my attempt to workaround the above, I created a new blank persistent level. I created 3 new blank maps. I kept a copy of my original persistent level with all of my objects and foliage. The idea being i would split my 1 massive map into 3 smaller ones.

I decided to bite the bullet and cull all the foliage and re-do it in each of the 3 maps.

I copied all of the objects from the original map into each of the 3 maps, with the thinking that each map would have its own copy of those objects.

I redid the foliage in each of the 3 maps but only in the areas relevant to those areas of the maps.

saved everything then exited UE and manually killed the original map file so it would no longer be the persistent level, as it doesnt let you delete it from inside UE if it is open in the viewport (and i cant figure out how to close it! so i cant delete it within UE! errr.)

re-open UE. I then look at my new blank persistent level, which for some reason has everything in my world in it, is not blank as i expected it would be, which i thought was weird, so I went into it and killed all the objects inside it. This had the effect of killing all my objects in all of my maps. ???

I would have thought I would just copy the objects from the original map into 3 individual maps, and the individual maps would keep their own copy of those objects??

So yeah as originally stated I need some guidance as to how this kind of concept is supposed to work.

I have made some progress on this.

I have been able to create 3 separate, playable maps. I can play each map on their own by going into the editor, opening the level for editing, then clicking on Play to standalone window.

What I havent figured out is how to load and unload the maps / levels through my blueprint class game logic. I have all of my gameplay logic in a blueprint class which works fine as long as you only want to play one map.

I am hoping to achieve something like the diagram below, when the player gets to the end of each map, it is unloaded and the new map is loaded, also it needs to keep all my blueprint class variables in memory:

I need some help on how to load and unload maps / levels. If I use Open Level or Load Level Instance, it seems to want to go into an infinite loop of loading the blueprint class. I only know this because I added a print “Hello” to a custom init function that gets called by the EventBeginPlay event in the game logic blueprint class. So for some reason this is being called multiple times?? why? If I just run one level and remove any calls to Open Level it runs fine.

so no-one has ever done this?

right so seeing as no-one here could be bothered to answer this, I had to answer it myself. stay tuned.