How do you load a level before playing

Hi,

I currently have a level that is my interactive main menu, when I click the New Game button it starts the Loading UI which I hope to add some BP’s to actually wait for a level load complete before opening the playable level, but I notice that ‘Preparing Shaders’ always appears when trying to Simulate the game as well as ‘TEXTURE STREAMING POOL OVER 230 MiB BUDGET’ when the playable level is loaded.

What I want is to have the level completely finished these operations so that the level plays smoothly. So the loading UI is actually waiting on a status OK or loading finished message before the load screen fades.

Can’t find a decent guide on doing this, hoping you can help me

1 Like

The shaders problem will not go away until you make a shipping build of the game. You need to make it using the project launcher

image

even though ‘shipping build’ is apparently available on the normal build menu

image

Last time I checked, it still makes a dev build.

The texture streaming message won’t appear in a shipping build, but it’s a good idea to set the pool size to the GPU VRAM size using console command

r.Streaming.PoolSize 4000 ( for 4GB )

If you want to load the level in the background and drop the player in when ready, then you also need to look into ‘level streaming’, because ‘open level’ will kill everything, including your menu :slight_smile:

2 Likes

Thank you for your response, the r.Streaming.Poolsize I’ve tried before and it seems to only apply to my current session, when I exit the project and open it back up the error message returns like it change the poolsize back on exit or something

I will have a look into level streaming, thank you!

1 Like

Hey there @judgejames! Clockwork already went over the shader bits well, so I’m just here to also mention Asynchronous Level Streaming is what you’re looking for when it comes to loading a level while keeping your menu loaded.

You can put it in the engine.ini :slight_smile:

Okay so I followed this guide on YouTube and have loading working correctly

Problem is, when the level loads, it’s like I’m controller a camera and it spawns outside the level, it’s like it’s ignoring everything my character has set up in the level, the level blueprint itself has really nothing in it

Character BP: FirstPersonCharacter posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Level01Map: Level01Map posted by anonymous | blueprintUE | PasteBin For Unreal Engine

any ideas?

1 Like

I don’t think you can use a level that has the player in it.

You have to load the level, when it’s loaded, spawn the player and posses it.

So remove PlayerStart and configure that logic in the level BP? (I’m not sure how to do it sorry)

Nope :wink:

Set the game mode for the level to stop it spawning a player

image

and save.

Load the level from the menu. When it’s loaded, spawn the player and possess from the menu code, then destroy the menu.

Something like that. It’s just a rough guide.

We are almost there I think, I spawn as the character but outside of the level

Fixed this too, but still spawns outside not on the PlayerStart

also got this errors

Did you tag the player start correctly?

image

No dice, still not working

Ok. I’m wondering if it’s a timing thing. Try this

■■■■, that didn’t work either, I changed the delay to 2 seconds after trying 0.2 and change the name of the PlayerStart tag to just Player in both tag and BP but still same result, it just doesn’t seem to look at the player start and its the only one I have

When the level plays, press F8 and you can take a look in the outliner. Is the player start where you think it should be? Does it have the tag etc?

Yeah it’s there, very strange
image

And it has the tag?

I’m not sure where to see the tag for it