Editor opens the wrong map (World Partition)

Hi!
I was having this problem using World Partition and I found a workaround but I am not happy with the solution yet.

I am using multiple levels created from the Empty World Partition Template in a Blueprint Only project. Let’s say they are Lvl1, Lvl2, Lvl3, etc…
From the Game Instance I am calling the Open Level By Name in blueprint (the names are correct, I checked).

I run it in editor and instead of opening the level I wrote, the game opens always Lvl1 and gives me this warning:

LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input ‘/Memory/MainGrid_L0_X-1_Y-1_DL0’ is in a memory-only mount point.
LogLevel: Warning: WARNING: The map ‘/Memory/UEDPIE_0_MainGrid_L0_X-1_Y-1_DL0’ does not exist.

I discovered that if I then run the Open Level By Name once again, it will actually open the level I want. So I have to run the code twice to make it work.
This inconsistently happens also in the packaged game, but the package game seems a bit more stable in this regard.

My initial workaround solution
I open the level, then I check which level I opened, if it matches the level I want, great!, if not, rerun the open level function.

My second, more stable solution
Created an Empty Level, which does not implement World Partition.
In the Open Level function, firstly I open the Empty Level, and check that I did indeed open it. I run it again if it didnt. This cleans up the memory.
Then I open the level I want.
It usually works.
I put a “WRONG WORLD!” debug message and sometimes it triggers still. But thanks to the redundant level reopening the game works.

Conclusion
I really don’t like this code. It feels unstable. It should work on the first try, right?

This is my sad “oops! try again” macro… :frowning: it’s ugly but it works

Does this happen to anyone else?
Any clues on how to solve this problem?

This is how I would like it to look like…

Thank you :slight_smile: