Hi everyone,
We want to achieve seamless transition between levels in our non-open world mission based game. We plan to do that by having a single persistent level that will contain all the mission levels as streaming levels.
We’re concerned that as the number of missions and levels will grow, the loading time of the persistent level in the editor will become unbearable. UE allows hiding levels in the Levels window, but not unloading.
We are willing to modify the engine code to be able to not load the streaming levels by default. We can probably start with hiding them by default. I guess it will be easy as the editor UI already allows hiding.
My questions are:
- Is there a better approach than using a single persistent level to achieve seamless transitions?
- Is there a technical reason why editor loads all the streaming levels by default?
- Can we expect significant difficulties while implementing the not loading of all streaming levels?
Best regards
Hello,
It’s recommended to use a World Partition level, which will allow you to load only the content that you want to work with in the editor. Check out our documentation about the feature:
Essentially, it will allow you to work in a single persistent level where you can load/unload regions in the editor as needed, then at PIE/cook time, it will automatically handle embedding the actors into streaming levels.
Thanks,
Ryan
World Partition is built on top of the level streaming system, which means it has the same capabilities and several quality-of-life improvements over the traditional level streaming setup. Could you share which version of UE you last used WP with and what the issues were, in case there are some improvements we could make around the feature?
As for why the editor loads the streaming levels by default, this predates my time with the engine, and I’m not entirely sure of the exact reason. As for unloading streaming levels in the editor, you would need to investigate this since it’s not something I have explored. At a glance, I see in ULevelStreaming::DetermineTargetState that going from ELevelStreamingState::LoadedNotVisible to ELevelStreamingTargetState::Unloaded through setting bShouldBeLoaded only works in game worlds. It’s been a long time since I’ve taken a look at World Composition, but it allowed unloading levels, which it did by completely removing the streaming level from the world (see FLevelCollectionModel::UnloadLevels) rather than setting the streaming level as unloaded while still keeping it in the world’s list of streaming levels.
-Ryan
We’ve used UE 5.4. There were issues with distant actors being streamed in. I wasn’t involved in the investigation, but from what I’ve heard the cause was that actors were being promoted too high in the grid hierarchy.
We expect sort of linear movement through the levels, so I believe level streaming is the better option here. We can for example not load/show a room behind the wall or on second floor until the player is about to reach it. I expect this level of control wouldn’t be possible with World Partition.
Thank you for the tips.
Cheers
The issues you mention are most likely not the case when using the new hash WorldPartitionRuntimeHashSet (see [Content removed] As for the level of control, WP has the same capabilities as the normal level streaming system, as it’s built on top of it. You would also get access to WP-specific features, such as data layers or HLODs. You may want to re-evaluate it in case its current state is a viable option for your project. The guide I linked provides a list of updates, which may also be interesting for you to consider.
-Ryan
Hi Ryan,
We ruled out World Partition, because we had issues with it on previous projects. Also, our game design suits the level streaming with streaming volumes more.
So I guess there isn’t a better approach. Could I please get answers to the last two questions? Thank you.
Best regards