In order to let our simulation system “see” levels, our level editor places a custom blueprint which messages the central logic object whenever it loads, checks if that object knows it exists, and registers itself if it isn’t on the list. As a result, even when the level is unloaded the simulation knows it’s there, and can do stuff like simulate NPC movement through the space.
The problem I’m having is actually initializing this system, as presently BeginPlay only seems to run on levels that are streamed in after the game starts. One option would be to manually keep a list of the FName of every level we make, and manually run Load Stream Level/Unload Stream Level once for each name, but even a modest-sized game could involve hundreds of individual levels, and that’s an awful lot of content to manually curate. Is there any straightforward way I can do this programmatically (well, blueprint-matically), and automatically generate a list of every level/level’s FName?