Lag spike first time i set level as visible but no more lag spike if i do it multiple times by hiding and rehiding... Only first time i get a hitch

Lag spike first time i set level as visible but no more lag spike if i do it multiple times by hiding and rehiding… Only first time i get a hitch. All levels are loaded from the start but hidden at the start… i am triggering them to hide or show based on location with trigger boxes…

As i said it starts hidden, and first time i make a level visible it gives me a lag spike, but if i trigger it to hide and then trigger it to be visible again it is no lag spike (only first time…) why? Anyway to fix it?

Hey there, you set all the leves initially loaded but hidden on the level details i assume, how are you toggling the visibility back on?

First screen shot is the settings for the levels … second screenshot is trigger boxes and level blue print…

Maybe the first time takes longer because it wasn’t visible so he might cache it for future views. You can maybe hack it by making it visible and then hiding it again on the loading screen.

how would i do that in blue print so that it would hide every level on start if i start them as visible to cache it?

You can try to have the levels start visible and then just do a for loop for all levels and set them to hidden. It’ a hack but it might work.

On the level details you set all of the levels to be visible and on begin play you create an array of map names and make them all hidden with the should be visible you did previously.

how do u do that ? :D… i am new to blueprints to be honest. Mostly do art and im trying to make performance top notch.

yea i meant how do i create the array and loop and all that via blueprint

Just create an array of names using Make Array and type in all the map names manually, then do a for loop from that array.

Paste this into your begin play, fill the array list with all the names of your levels.

hate to keep bugging you, but where do i paste this? lol… i dont see any input fields or text fields…

I have no idea how to do this… every tutorial i find seems outdated… and none of them use this make array thing… that i have no idea how to use.

make array doenst have any input fields on my end. How do i make it so I can type in names?

again… i dont know how or where to paste that… i see nodes… thats all… and the ability to create nodes…

Nevermind… I think i just figured that out by randomly right clicking stuff… THanks for the help!

This doesnt seem to work for setting my sub levels invisible that are set by name… Seems like they all still start visible…

Copy that and paste that into the level blueprint’s begin play event and connect the execution wire to the for loop. On the Make Array node you have a few None’s, replace them with your level names.

If you use my paste it will, you can connect a make literal name and connect to pin 0 and see if that does it.

Ctrl+V on the level blueprint.

This doesnt seem to work for setting my sub levels invisible that are set by name… Seems like they all still start visible… this doesnt make anything invisible at all…