How to get all persistent level names in BP

How to get all persistent/ sub-level level names in BP into an Array.

I was able to get all the level names into an array, but i cant seem to figure out how to filter the results or just getting the persistent/ sub-level levels into an array.

Anyone know how to get the names?

Is this what you are looking for? WTF Is? Array: Find Node in Unreal Engine 4 ( UE4 ) - YouTube

I wanna do this how would i do that, sorry im still quiet new, and im trying to wrap my head around all of this.

Ok, this might be a solution for you.

I can add additional information if you want. If this works the way you want it please mark the answer as correct. Thanks!

You can change the start position of the substring node if you don’t want the 2 “lvl 2 _base_sub_2” to affect the filter.

The ForEachLoop goes through each variable in your array and uses it in the loop, I get each string one by one and find a substring inside the array’s string, and if it’s not there then the substring function will output -1. So if it is there we want to add it to our filtered array of strings.

Sorry I meant to write lvl2_base_sub_1…3 it’s getting a bit late already haha, I’m gonna test it tomorrow. Really thanks a lot I was banging my head against the wall how I would do this the whole day.

Yup it worked, thanks!

Hey, I would appreciate it if you marked the answer as correct if it was what you were looking for, by hitting the little tick to the left of the answer beside the two arrows. Thanks a lot!