ForEach Unload


Any idea how i could make the function to work with this unlaoad? So it goes thru whole array and unloads everything before loading new one?

It’s all over youtube… everybody uses functions when they should be using events.

And now, it’s payback time :slight_smile:

The whole point of functions, is you get a value back. That’s what they’re for, to get the one value. So the moment you do this

image

the function exits. In other words, it exits for the first value in the loop.

Also, functions won’t let you use ‘latent’ ( time based ) nodes, as I see you’ve discovered.

So you just do it with an event, like this

And you can call it like this

image

Its just not purple but, meh…

1 Like

Helllo, thank you for your help, i tried it, but still, it unloads just first index and none other.

So it starts, but doesnt unload any other level except 1.

No, it doesn’t work for some reason, does it.

But that’s cool, because this does

and it has the upside that you don’t have to mess with the levels window :slight_smile:

1 Like

Thank you for your support. But i need to make it with LoadStreamLevel, its c++ & bp (VR), so i can load some functions just once, and i have some stuff that i can load just once :sweat_smile:
Its my summer internship, first encounter with BP and UE, so im still figuring thing out :grin:
Just gonna do the simple way, somehow store last loaded level, load next/unload last :))

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.