Main menu to world composition

Hi,
I’m currently working on an openworld RPG (like Skyrim)
The landscape level is using world composition and I have many “indoor” levels.

The game starts on a “mainmenu level”, with a classic menu (new game/load game/ect)
Like in Skyrim (or many open world RPG), when the player load his previous save game, it should load the level of this save game (landscape or indoor level).

For now, I’m using the “open level” node to load the persistant level of the “world composition level” or the “indoor level”.
Before doing this I’m adding a “loading screen” widget to the viewport, then remove it when the “maingame” player controller begins.

The problems :

  • The loading screen which is animated is freezing (because of blocking thread)
  • The loading screen is removed once the persistant level is loaded, even if I remove the “remove from parent node”, so I guess it’s because the viewport is reset.

I know that the solution for the freezing loading is to use level streaming BUT, I’m already using world composition which use it’s own level streaming.

  • I can’t add my “mainmenu” level to the persistant level of the world composition landscape because you can only add landscape tiles as sublevels. (and it makes no sense as the player can load an indoor level if he was there on last saved game)
  • I can’t add this world composition persistant level to the mainmenu persistant level then stream it because it only stream the persistant level on not the sublevels

Is there a setup allowing to do this in UE4?
I know Dragon Quest XI is made on UE4. It’s a RPG with openworld but not sure if it use world composition.

So your main problem is that the UMG loading animation is not running because the entire game is blocking, waiting for the level(s) to load?

Not just this.
If I add it to the viewport before opening the level, the loading screen widget is destroyed by itself, so you can see the persistant level (landscape level) with its skysphere before landscape tiles are streamed, then the player character spawn, then the grass is spawned, etc.
I would like to use the loading screen to hide all of this by destroying it only some seconds after the player character is loaded.
As I said, I guess it’s because the viewport reset when changing level.

Hm. I don’t know. I have a couple of ideas though.

I believe there is an event fired when a level streams in or an event for when a level is opened or closed.
Maybe you could use that event to spawn the loading screen widget again if one is not already visible and is in the viewport (there are two nodes for checking that).

Question: Is the pawn destroyed and created when you load in the level? If so, you could do something hacky and give the pawn blueprint a component that blocks their camera’s view until it is told to hide the component.

'I believe there is an event fired when a level streams in or an event for when a level is opened or closed."
All “begin play” event fire when you open a new level

“Maybe you could use that event to spawn the loading screen widget again if one is not already visible and is in the viewport (there are two nodes for checking that).”
The problem is that the loading screen will still freeze but it’s still better than nothing.
Anyway it should be possible to have animated loading screens working with games using world composition because due to world composition, I don’t see a way to use all the “level streaming loading screen” that I read.

I wish I knew more and could help. I have never used World Composition myself, or Level Streaming either :frowning:

Well, in fact, adding a new loading screen at begin play doesn’t even work.

What happen is that my first loading screen appear while I hit the “new game” button from the main menu level
Then it disappear and my persistant level is showing with the built in 3 dots loading thing
Then the second loading screen appear