Download

Fastest way for level streaming

Hey devs,

I’m currently working on a project which needs a very fast level streaming of a few hundred levels. All levels can/or should be loaded at the gamestart and just need to be set visible.
So I went through the answerhub and the UE-doc searching for good ways to show or hide a lot of levels as fast as possible.

In the editor the solution with the bShouldBeVisibleInEditor-flag works awesome! I created a prototyp for the editor and got a result nearly instant. Setting this editorflag worked like a charm!

So I tried the same solution with bShouldBeVisible for the game view. But unfortunately I always got a crash with the assertion error telling me that ULevelStreaming::bShouldBeVisible was not equal to ULevel::isVisible. I always used UpdateLevelStreaming and the corresponding FlushLevelStreaming function.
After a lot of successless hours I tried the same in Blueprints with the LoadStreamLevel-Blueprint and this works. But the loading times are even after they are loaded to high. (around 15 seconds vs. less then one second) Loading the same levels in editor is nearlly instant.
After that I wrote the same Blueprint-code in C++ with the UGameStatics::LoadLevel-function for the level streaming part. But the performance was unfortunately nearly the same as with the LoadStreamLevel-Blueprint.

So: what’s the fastest! and best solution to load stream levels? They can be preloaded at the application start.

I think that is a common problem and a lot of you are also interested in a fast solution. So I hope a lot of you join this conversation and together we can find a good way and maybe add a WIKI article!

Regards, Florian