Help for procedural generation


I’m trying to generate a map using premade rooms.To do so, I need to insert some “point of references” inside the sublevels to know where is the entry, the exit or other stuff like that.

At the moment, I’m doing this:

  • I created an empty level and added the premade part in it (I only have one at the moment). I hid them too. The premade parts have some invisible actors that I used as “point of references”.


  • Then I changed the parent class in the Level Blueprint and called my own function in it.

  • Then, in the code, I copy a random sublevel

  • Here is the problem, I would like to acces the actors to get the informations they have but the only way I found to do it is by using GetLoadedLevel(). But it doesn’t work since my levels are not loaded yet.

So I have 3 questions:

  1. Is using Actors as “point of references” a good thing ?
  2. If not, what can I use ?
  3. If yes, how to access them from where I am. I think of using the OnLevelLoaded callback but to do so I need the levels to load in the same order as I mark them to load and I didn’t find the info.