Download

Accessing actors in sub-level in the main level

Hi there, I’d like to be able to break my levels down into several sub-levels for ease of editing and simultaneous team work. To this end I moved all my level gameplay objects to a Level_Gameplay level underneath my main persistent level. Immediately there was the problem that objects in my sub-level cannot be directly referred to in my main level’s blueprint, where I have important logic involving those objects. I could move some logic down to the sub-level’s blueprint, but I’d really like there to be a way for me to refer to objects in sub-levels from a super-level’s blueprint, otherwise things get messy between the main blueprint and the sub level blueprint.

So my questions are:

  • Can I refer to objects in a sub-level in the main level’s blueprint?
  • Can I create links between objects in sibling levels, or must objects always be in the same level as each other?
  • Can I interact with a sub-level’s blueprint from the main level’s blueprint?

I mainly want this arrangement for the sake of team work, where someone can be editing the lights or backdrop geo without clashing with someone that’s just rearranging some gameplay stuff. Could I achieve that without breaking things down into sub-levels like this? Any thoughts anyone has much appreciated.

Just bumping this. I think the breaking down of levels into sub-levels as work units for different members of the team is an important production method. I’m probably missing something, but I wasn’t able to find anything obvious in the documentation, so anyone’s thoughts would be helpful.

I would also like some input on this. The only real hint has been from this thread:

https://answers.unrealengine.com/questions/49988/how-to-change-a-sub-level-variable-in-levelpersist.html

You could always use blueprint interfaces to communicate between levels, however, you’d need to have said levels loaded for any code to work. The best bet is that anything that needs to be accessible across levels should be kept in the persistent level. Then it’s always available to access. That’s the intended use for sublevels.

You can. Go to your main level’s blueprint, create a variable of your object’s type, but use “Soft Object Reference” (instead of default hard reference). Then, you can set this variable to any object in any sublevel.