BTW if you don't want to use level streaming you can also: 1) async load Asset (using the level reference) 2) Display loading screen 3) When loading is completed use open level node This removes most of the screen freeze incurred during the loading process.
@thegamedevcave11 ай бұрын
that also works out great! I like using level streaming because it allows me to keep my player object around without having to reload all kinda of stuff like HP/ weapon loadout/ level/XP/ etc. But if Level streaming isn't an option for whatever reason (there could be loads of reasons i'm sure!) this seems like a good alternative!
@FTChristmas10 ай бұрын
Most helpful comment ever - thank you! 👍
@IWillYeah10 ай бұрын
@@FTChristmas no prob 🙂
@dudiheadz8 ай бұрын
I'm making a multiplayer game, and the level streaming part of it was making my head hurt - this helps so much! EDIT: For the open level node, would you say to open it by name or by reference?
@zork0w8 ай бұрын
@@dudiheadzI think that by reference is still better and u will get an entire control on it (with variables, etc..)
@noahbrewer24768 ай бұрын
Honestly this'll help me a ton with a massive project I'm working on. Thank you for supplying your knowledge :)
@BenLeskoGD10 ай бұрын
I was looking for this, thank you!
@MsomeleShow10 ай бұрын
As you mentioned on 5:10, how would you enable visiblility of a speceific loaded level via blueprint? I've been struggeling with that a week now can't find the way.
@thegamedevcave10 ай бұрын
i've never really found a context where this is actually relevant but i am pretty sure you just load again, but this time with that box ticked, since it's already loaded, it will effectively just turn it visible without having to load
@belekass4 ай бұрын
What should i do if my level is too big. What I mean is the character is in floore or sometimes under it
@eddielonestar79628 ай бұрын
Hey there. Great tutorial. For some reason I'm unable to select LEVELS under the WINDOW tab. It's not there. I've reset the editor view back to default also. Where has it gone or what do I need to do to enable it again please?
@musicc2679 ай бұрын
How did you create a World type variable? It doesn't show on my variables type list.
@ghostgamer2609 ай бұрын
If you make a variable from that cyan dot by right clicking it’ll make one for you.
@Dan-codes2 ай бұрын
Could you cover multiplayer level streaming/loading setups please?
@artist_art_sol4 ай бұрын
How to specify in a variable the same type "world" as you have specified for levels? I can't find it in the name dropdown when I assign a variable type?
@thegamedevcave4 ай бұрын
yeah for some reason it's not in the dropdown, if you just right click on the load level node's input and promote to variable it'll work though.
@ART_SOL_GAMES4 ай бұрын
@@thegamedevcave I understood it. How can I indicate such a link in the structure or input/output of some interface? no way?
@thegamedevcave4 ай бұрын
@@ART_SOL_GAMES yeah i dont think so sadly. if you want to setup an interface to load your levels you can do it with a string, as there also is a load level by name node you can use. I personally don't like it because it's easy to make a typo but if you have to use it in an interface, it's probably in only real option you have in blueprint.
@ART_SOL_GAMES4 ай бұрын
@@thegamedevcave Thanks a lot! You helped me a lot. This is what I do using names.
@johnrex71082 ай бұрын
@@ART_SOL_GAMES Actually I found this out myself. The 'World' type variable that Unreal's levels use is listed within a struct variable called 'Soft World Reference', just set that into any function/interface's input/output variable and then BREAK it. That will give you access to 'World' type and you should see the same kind of list of levels as you do when using Unreal's Open Level function.
@LeateqOfficial10 ай бұрын
Amazing tutorial, thanks for this ! What to do if i want to make a game when you have a hub, and when you enter a door it randomly teleports you to one of 20 levels How do you make it work ?
@odinzai47699 ай бұрын
I was wondering the same thing!
@SEANandSYD9 ай бұрын
A multigate that splits into all 20, and the box marked random is checked
@Tommyboi75662 ай бұрын
Random int in range then do a Switch on int node add pins based on the ammount of rooms you want then on pin one load level 1 pin 2 level 2 ec
@chris-xi7uo3 ай бұрын
hi so i have maps that when loaded occupies the same space and when loaded they overlap how can i move them so they dont overlap each other
@rifat.ahammed3 ай бұрын
One of the best video about async level load
@Eroktic10 ай бұрын
Why I haven't seen this video earlier. Thanks!
@skal380211 ай бұрын
The best UE guides on whole KZbin
@thegamedevcave11 ай бұрын
Thanks! happy to help!
@qawiyrasyidrafi310320 күн бұрын
are this level streaming work with multiplayer?
@roydash565710 ай бұрын
I have one question I can load Map?
@KeenanBrown-x9r5 күн бұрын
good question
@VinoVenitas8 ай бұрын
This was useful thank you. I love the fact that I finally have a solid way to actually include loading screens into my game. Because I have a feeling I am going to need them. So this was great. Thank you. I will probably replace the casting with an interface because casting isn't the preferred method but still a good tut so thank you.
@thegamedevcave8 ай бұрын
yeah casting to check for the player character isn't great xd you can just "get player character" and use an == node instead, prevents having to do a dynamic cast. Interface is even better. But in reality, casting to the player class actually doesn't matter that much, not casting is about preventing unneeded classes to be loaded into memory but your player'[s class will always be loaded anyway, so you're not actually saving all that much by avoiding the cast
@devinbrasher67525 ай бұрын
You skipped promoting the LevelToLoad to a variable.
@Arengan5 ай бұрын
@ghostgamer260 replied this in the comments with "If you make a variable from that cyan dot by right clicking it’ll make one for you." and iit works. He refers to the cyan dot at the load Stream Level node
@Flowerpot29055 ай бұрын
Great content. Just what I was looking for.
@Skyrim9732 ай бұрын
Some people say in youtube that Level Streaming dont work very well and them say that is bether persistent levels and use a save system for this. And what about word partition? It work?
@thegamedevcave2 ай бұрын
I’m using this way to load in and out about 25 levels at the moment, with plans to scale up to over 100. Have never had issues. Of course, don’t load all at the same time while working on things but there’s really non-issue that I’ve ever seen. Anyway, world partition really is something else, more for loading chunks of a bigger level instead of loading smaller levels or more specific sections of a level. It’s aimed at open world like games. Carrying persistent data with save object…. Is a thing you can do but I don’t love that either honestly
@EmarStudios7 ай бұрын
i don't seem to be able to get the "set actor location" thing to work right
@yorisongs98049 ай бұрын
When using Load Stream Level (by object reference) to switch sublevels, is it possible to arbitrarily switch game modes, as setting a new GameMode on the NextLevel side does not seem to override it properly.
@thegamedevcave9 ай бұрын
sure thing! just gotta set up an event dispatcher in the widget that calls out whenever the button is hit and assign the load function to that event dispatcher
@KADstudioArchitect15 күн бұрын
Hello and thank you, I am looking for load/unload based on camera view, is that possible? I mean only load objects are in camera view , if camera for example rotates to other angle, load some objects are in that shot and unload others not in camera view shot. I think that's gonna do super optimization, I need for VR headset. Something Like Ray Cast Thank you.
@thegamedevcave15 күн бұрын
This is usually mostly a gpu optimisation thing and as far as I know, already done by the engine. You certainly don’t want to load and unload objects from system memory constantly. Loading assets into memory takes quite a lot of cpu, if you’re doing that constantly for a bunch of objects your framerate will tak instead of improving.
@bakaabsolute12536 ай бұрын
do you know how we can restart sublevel ? for example, u spawned 10 new actors in sub level A, you load sub level B then unload sublevel A, but yours 10 actors spawned dynamically will still be in the game
@thegamedevcave6 ай бұрын
So the issue here is that spawning actors spawns them into the persostant level, not into the same sub level that the spawner exists in (which is really annoying) in c++ you can give it a level to spawn in, as far as i know, blueprint doesnt let you do that so a workaround is to keep an array of actor references on the spawner and when the spawner is destroyed, it loops through that array and destroys all those other actors too. Not an ideal sollution but it'll work
@IN-terestShorts3 ай бұрын
Open level By Name is not working properly in Multiplayer. please show how to do this in Multiplayer
@Skyrim9732 ай бұрын
I would like to text word partition myself, they say it doesn't work but I want to try it.
@nobodyimportant47787 ай бұрын
So you can also use this for culling?
@projectgg67309 ай бұрын
So what about multiplayer? Rn I have it so from the main menu if you click on LAN multiplayer (this game is lan only rn) It will open level by name with ?listen. From there someone can host and someone can join. Once the other players join (up to 3) The host can start the game. Im doing it rn with a seamless travel and I have a transition map and everything. However this seems so much easier to move a session to a new level. Thoughts?
@thegamedevcave9 ай бұрын
not entirely sure on multiplayer, for that I think your original method might work better still, but it's worth trying if loading asynch on the server like this works. I imagine that it would.
@djordyroke618 күн бұрын
if i load into an new lvel the loadingf screen stays up untill i kill the game am i doing something wrong
@KeenanBrown-x9r5 күн бұрын
I pray you get a response.
@djordyroke615 күн бұрын
Asked the same question on an discord server so it’s solved
@nickbakalos917 ай бұрын
Does this work for waiting for nav mesh to finish generating? I am curious how to fire off an event to know when the navmesh is done generating to close the loading screen.
@thegamedevcave7 ай бұрын
I think navmeshes usually dont get generated on runtime so I dont think that's something you have to worry about. navmeshes can update on runtime still, but the base navmesh should be generated beforehand and will simply get loaded in like any other asset in the level. So these events would only run after it's been loaded in I believe :)
@FPChris3 ай бұрын
If I'm currently in Level 1 and I load a save game that is Level 3 it dumps the save game when Level 3 is loaded and you have to load it again to continue parsing data. Seems wrong to load the save game data twice? Are people doing it a different way because I don't see a why around it.
@KeenanBrown-x9r5 күн бұрын
I think this tutorial has major issues, its not you.
@DJDCRYPTER3 ай бұрын
Just stumbled upon your channel and got to say there is some amazing content which is helping me a ton. But for some reason with this tutorial the first level loads fine but when I hit the part where it should switch to level 2 it just get stuck on the loading screen and does not progress further. Any idea why? (i'm using 5.4).
@KeenanBrown-x9r5 күн бұрын
wow this guy answers nobody
@SAURAVVISHNUGITTEАй бұрын
Amazing , Thanks I needed this,
@COACH_KARSTEN_OPPINIONS-xs3xn4 ай бұрын
Does this mean, that if my player picks up a weapon, and then goes to the next level, the weapon will not be there, because the weapon belonged to a different instance?
@thegamedevcave4 ай бұрын
if the weapon is just an actor that you place on your player yeah. so either weapon spawns will need to be in the persistent level or picking up a weapon should not just move the existing object to the player's hand but instead set a child actor component on the player to turn into that weapon's class, and then you can copy over any needed data from the weapon in the level into the child actor component on the player.
@COACH_KARSTEN_OPPINIONS-xs3xn4 ай бұрын
@@thegamedevcave thanks so much 🙂 I will try to accomplish that. I only learned few days ago how to move back and forth between levels, so I have a LONG way ahead. I have SOME background in the OO-universe, which made me think in "instance variables" and .self and all that, and thought this may pose a challenge.
@BubuRuzu10 ай бұрын
But is there any downside in using level streaming? Like, for example, will lighting spill into the other level on baking?
@thegamedevcave10 ай бұрын
it shouldn't. you can bake the lights in each individual level if you prefer even (every streaming level can be opened on it's own, isolated from evyerthing else as a level) but even if you do bake everything from the persistant level with everything it in, you should't have any overlapping light. you may want to test it to be sure for your usecase though but generally I dont imagine you'd have lights that are big enough to reach from 1 level into the next if you place them a little distance apart, and on top of all that, i assume your levels will have walls that prevent all that to begin with :) No single sollution is perfect though, there's up and down sides to everything but I'm fairly sure that the light situation should be fine.
@BubuRuzu10 ай бұрын
@@thegamedevcave Thanks. For my case, my levels will be completely different from each other, different skybox, directional light etc. I wonder if, in that case, there will be any problems. The reason I'm using level streaming is because open level doesn't allow for data persistance very well, if at all.
@thegamedevcave10 ай бұрын
You should be able to include those directional lights and sky boxes inside the streaming levels but those indeed may cause some light baking issues i can imagine so in that case i would probably just try it out in a test project first to make sure. Possibly baking the levels 1 at a time instead of baking in the persistant level is still an option. Nit ideal though. Might also be easier to simply not bake those lights if you can get away with it xd
@aleca89109 ай бұрын
Lights should be always in your persistent level.
@sum_rains789910 ай бұрын
Great Video, Thank you. Joined the discord
@TheDjscrady8 ай бұрын
just a question: if i use water system of ue5, can i do the same level streaming?
@thegamedevcave8 ай бұрын
I don’t think that really will impact eachother to be honest. Aside of course from the fact that water won’t interact with objects until they are loaded in
@tgykurtulus28 минут бұрын
Hmm that can be a bit controversial ; because if we are doing this by reducing the loading time, It may work with small levels to be loaded. but if you are trying to a world travel system and lets say each level is big (even they are not huge), your persistent level will be massive and will take ages to be loaded . If you know how to reduce the memory size of the persistent level I would love to hear because currently my project has 10 sub levels and 1 Hub level , and because of streaming level logic it is massive and takes too long to load.
@thegamedevcave20 минут бұрын
the persistent level will be mostly empty, aside from the player. the persistent level doesn't need to load in all of it's sub levels on startup so that's not an issue. and inside the editor you can turn off individual streaming levels, so you only need to have the ones you're working with open. of course, this is just one of many solutions but there shouldn't be any real issue with scaling honestly
@nuttyak2taps10 ай бұрын
For my game I'm thinking of using a seamless level loading system similar to Half Life, but without any loading stutters. Do you reckon this would be viable, or should I just accept the loading screen?
@thegamedevcave10 ай бұрын
for the most part, unreal very much is built to support games without loading screens. this method is kind of a roundabout way to emulate classic games with loading screens. what you are probably looking for is Level streaming volumes. with that, as long as the players is isnide a certain box, it will load in a streaming level (which holds all the assets of that area) and then when you leave it again, it all get's unloaded. Loading and unloading level streams is done on a separate thread , so the game won't stutter when you do it but you do need to make sure that the game has enough time to load in the streaming level (which is why a lot of modern games have things like climbing or crawling sections, those are pretty much just replacements for loading screens)
@nuttyak2taps10 ай бұрын
@@thegamedevcave Interesting, I recall seeing the level streaming volume and was hoping it'd be used for that purpose. Thanks for the reply!
@abdoulraoufgambo7 ай бұрын
Hello ! i hope you're doing well ! I have a very big landscape. can this logic work with it ?
@thegamedevcave7 ай бұрын
if you're wokring with a big landscape you should probably more so look into world partition
@jlebrech9 ай бұрын
you could begin the loading BEFORE you touch the door, and open the level if it's finished loading when you touch the door. and it's still loading then you still have the loading message.
@thegamedevcave9 ай бұрын
exact implementations depends heavily on your game but you could of course do that! espcially if your levels are small, it would allow you to not have any need for a loading screen in most cases. (then again, if your levels are small, it's probably not an issue either way). Worth keeping in mind that if your streaming levels are very large, having multiple of them loaded at the same time, while it may prevent loading times from getting long, it will also require a good bit more memory. so as always, it's a balancing act which heavily depends on the actual game, it's size, how it's structured and so on :)
@jlebrech9 ай бұрын
@@thegamedevcave a lot of games have a loading screen corridor.
@thegamedevcave9 ай бұрын
@@jlebrech that’s a whole separate option, I think it’s an overused and annoying technique personally, I would much rather just have a loading screen instead of mindlessly having to press forward for something that is effectively still a loading screen but now requires me to be there. Of course you can make that more engaging by loading some simple extra things into a corridor like that. Most games do not do that sadly
@Djackz10 ай бұрын
Thanks for the video! How do you rotate the capsule my guy is facing a wall? Rotating it normally doesn't work
@thegamedevcave10 ай бұрын
you can do it in whatever way works best for you, the way I do it is I have a component that I copy the world rocation and location from onto my character (good to make it an arrow component or something so you can see the rotation)
@joel-BB10 ай бұрын
This is great please make more videos like this!
@mobildisko57910 ай бұрын
I want each map to have its own volumetric fog, light and sky, this method won't work for that, right? Because from what I understand, you actually have to have the same sky setup and lighting, like they're all in the same level.
@thegamedevcave10 ай бұрын
You shoyld be able to have seperate sky lights and fogs in each streaming level if you need. Or make a system where the color and density of those things is driven by the game mode and whenever you load a level, at the begin play of the level blueprint set the settings you need for that level. Neither is ideal so in this case you might still want to open level the other way instead of streaming levels
@mobildisko57910 ай бұрын
@@thegamedevcaveThank you for the answer, I tried to understand what this is and what it is not, eventually I realized that it would not work for my situation. Fortunately, I solved my separate level and save system and it wasn't too much of a problem. Maybe you were not aware of this while making this video, some things are born out of real need.
@ryanjdevlin8711 ай бұрын
bro this was pure gold omfg thank you so much this + ur level streaming tutorial answer'd so many questions of mine ! Im finally understanding how the hell I'm gonna load all these 4K assest's I have without the players PC melting lol ! Thank you so much !
@thegamedevcave11 ай бұрын
Glad I could help!
@4rzky5365 ай бұрын
finally i found what i was looking for, but i still haven't found it, just a few actually, like how to combine it with a progress bar or percentage, so in the loading screen we can see how much longer
@thegamedevcave5 ай бұрын
about 99% of progress bars you see in games are actually straight up fake, just showing an estimation of how long the dev thinks you'll take to load a certain scene. (which is also the reason that a lot of games will often hang at 99% loading, because the computer is slower than what the devs expected). there is a function called "GetAsyncLoadPercentage" in c++ which you could use to display true loading times (more or less) but it's a slow operation which will make the loading take even longer, but if you do it on something like a 0.2 second timer or something, you might be fine to use it. As far as i know, with just blueprint you wont be able to do this, and that is most likely because rarely would you actually make a proper accurate loading bar. as with so many things in game dev, games often straight up lie to people to make them feel better.
@4rzky5365 ай бұрын
@@thegamedevcave I didn't expect you to give such a detailed explanation, but yeah, so far I've never found an explanation on how to display the level loading time in percentage form, most suggest adding a delay, say 2 seconds, but I think this is unfair, if the user is using a high end PC this is a very long time, but if they are using a mid or even low end PC, 2 seconds is a very, very short time, they will even arrive when all the levels have not finished loading, I find this very often especially in indie games, the level is already open but is still in the loading stage, such as textures, lights, even static mesh, thank you for taking the time to explain this in detail😊
@dmangamesSTUDIO7 ай бұрын
Great tutorial! Thanks for making this
@RV-bc9yi5 ай бұрын
Hum, hum Thanks for this video! My character keeps falling. Should the BP be in the persistent or in their levels?
@thegamedevcave5 ай бұрын
player character probably best to be persistent
@RV-bc9yi5 ай бұрын
@@thegamedevcave Ok, ok it's my bad, i forgot check "Make Visible After Load" in BP Level !
@KeenanBrown-x9r5 күн бұрын
Please tell me how to actually make the Current Level and Level To Load variables that are ESSENTIAL in your tutorial thanks.
@thegamedevcave5 күн бұрын
right click on the input pin for the nodes and promote to variable.. for some reason blueprint won't let you make it if you just make a variable but doing it via the node still works.
@krisnapradyana8917 ай бұрын
Cannnot find World data type 😕
@thegamedevcave7 ай бұрын
you can add one by right clicking the load level from object node's world pin and promote to variable. for some reason it's not in the list of variable types.
@alexpineda34229 ай бұрын
I can't find a World variable type
@thegamedevcave9 ай бұрын
for some reason this is an issue, if you right click the wrold variable type pin on the load level node you can promote it to variable and it'll make a variable of the right type. Not sure why it has to be done in this roundabout way. I believe you can also use a level variable instead of a world though and that should still work, so that's probably why
@krisnapradyana8917 ай бұрын
@@thegamedevcave There is also no Level Variable
@thegamedevcave7 ай бұрын
@@krisnapradyana891 just add a "load level by object" node and promote the world pin to a variable. I'm not sure why unreal is so annoying with not allowing users to make world or level varaibles in blueprint.
@dukesofdevonАй бұрын
Awesome vid sir, sub
@crunchycoconuts69173 ай бұрын
You forgot to link your video in the card up top.
@thegamedevcave3 ай бұрын
i'm kind of surprised nobody mentioned that before this moment. I added it now :)
@JOEFRAUST13 күн бұрын
Does this also work for Unreal Engine 4?
@thegamedevcave13 күн бұрын
pretty sure it works the same yeah
@wilismatrix984711 ай бұрын
lol the best easiest tutorial so far for async loading !!