hewiefreeman
hewiefreeman

Reputation: 1187

Streaming Levels Limits?

In UE it seems the only way to seamlessly travel between levels is with blueprint level streaming. My goal is to have a "loading level" which is a very basic, always loaded level that becomes visible when loading into a real level. Upon load completion, loading level plays an animation and then hides itself and fades into the real level.

I set up a map that I named PersistentMap that only has an actor PersistentOrigin which holds some global variables and event dispatchers. So all streamed sub-levels can use PersistentOrigin to send event calls (which are handled by PersistentMap blueprint) and use it's globals. The sub-levels in PersistentMap are the LoadingMap, MainMenu and various other sub-levels.

This has been working really well and smooth so far while testing, but my main concern is when I have more than 10 or so sub-levels with a lot of actors, meshes, and textures. And all being contained in PersistentMap.

So, I have a few questions regarding this setup, and all responses are valid and appreciated since this is very technical:

  1. On the editor side while developing, if I use the option Show Stats > Stats > Engine > Levels for the PersistentMap it shows that all the sub-levels are "Loaded Not Visible". Doesn't this mean that while I have this map open in the editor, all the sub-levels are loaded in memory? Is there a way to only load them if they're visible in the editor? I feel like this will get really taxing on my (and other devs') system later in development, no?

  2. After building the game and launching it, does the amount of "Unloaded" sub-levels and their content in the PersistentLevel affect initial load time? When I play test, the Level Stats show all other levels as "Unloaded" when I would want them to be. Fine and dandy. I'm only assuming this means the amount of sub-levels won't affect the initial load time?

  3. Is the method of communication between levels described above through event dispatchers and some variables in a PersistentOrigin actor viable? It at least made my blueprints cleaner when I thought of giving that a try...

This has been something bothering me since I started developing with UE5, and can't find any in-depth or reputable sources for answers and/or work-arounds. Thank you to everyone in advance <3

Upvotes: 3

Views: 1752

Answers (1)

John Daniels
John Daniels

Reputation: 1

After doing tons of testing, the answer is yes, just the persistent level is loaded in memory and then the sub levels will be loaded when needed.

Upvotes: 0

Related Questions