Need to expose this variable from ULevelStreaming

Hello,

I’d like to expose this variable flag ’ bIsRequestingUnloadAndRemoval’ in ’ in ULevelStreaming’ to blueprint but am at a loss as to how exactly to do it.

You may have to override the engine to do that. What do you need it for, there may be another way?

I’m streaming in a lot of levels in a grid around the player. As they move more levels are added in front of them. Currently I’m looping through an array of these streamed levels and performing a check on them to see if they’re far away from the player. If so I’ll unload them, if not I’ll load them back. This basically allows the player to walk and have the level form around them but unloads parts further away. Problem is unloading the levels doesn’t delete them so I end up with an array of 1000s of level instances that I check distance for each time (wich causes a frame lag that gets worse as the array is bigger).
Heard this flag when set to true actually removes the level instances completely thus my array wouldn’t get massive over time.
This is probably not the best way about it.