Sublevel has wrong position after OpenLevel() in Editor

Hello! I’ve encountered the next problem while Play in Editor (In Standalone it’s ok):

I placed two sublevels inside the persistent level, gave them a unique position in Level Details window. These two levels I also use in the other level with a different positions. After the OpenLevel() these sublevels keeps their positions from the previous level - that’s the issue.

What I’ve tried:

  1. Repaired the engine
  2. Cleared project folder (Saved and Intermediate)
  3. Unloaded streaming levels before OpenLevel()
  4. Print String names and positions of the sublevels - they’re all right: different names, expected locations
  5. Set streaming method to Always Loaded and vice versa

Nothing of that could help me. And what’s strange that this problem didn’t bother me earlier. Nothing that I’ve done to the levels recently.

If you’re working with a persistent level and sublevels, then that puts you firmly in the level streaming area.

OpenLevel just opens a level and puts it bang in the viewport. You need LoadLevelInstance, then you can specify the offset.

I’m not sure, but documentation says that LoadLevelInstance() wouldn’t work if sublevels are already defined in the Levels tab. That means that I should remove sublevels from the persistent and load them procedurally on BeginPlay() which makes a lot of inconvenience for the viewport editing and level-design. Am I right?

You can’t stream them unless they’re in the levels tab.

By default, the streaming method is blueprint.

Ok, I’ll try your method! Thanks!

Tell me how it goes :slight_smile: