I was wondering if you could give us some guidance about how to make sure that the Level Streaming is finished (sublevels loaded and visible) at a given location.
Let’s say our worlds heavily relies on Level Streaming with volumes placed in the world, and when respawning the Player at a given location, we want to make sure that all the levels there are loaded and visible before starting rendering the game.
So you should have access to the actual LevelStreaming object to be sure that the level is already loaded and the player is ready to go. You can get the ULevelStreaming directly by using:
UGameplayStatics::GetStreamingLevel
Once you have it, you have a few options to check if the streaming level is really loaded and visible. The functions I would use are:
With these checks combined, you can be sure that your
ULevelStreaming is fully loaded. The usual flow is: load the streaming level, wait until all flags return true, and then enable the player at the desired position. Another option is to call:
UWorld::FlushLevelStreaming
. This is a blocking function, so you need to keep that in mind, the game thread will pause until all the streaming levels you’ve indicated are fully loaded.
If you want to actually check if a location has their corresponding LevelStreamings loadeds, I would create like a Dictionary of locations or reference points with their corresponding LevelStreaming and check them manually with the functions I mentioned before.
Let me know if this can help you out with your issue.