Apparently you need to supply the whole path to the level, otherwise it fails saying “short package names are not supported”.
However I found that when the game is packaged, my code does not work. What Parameter do I have to provide for it to work on the packaged game as well as in the editor?
Incidentally, if you DID put the maps in a different location then you’re going to have to setup that directory to be packaged.
You can do that in the editor by opening your Project Settings (in the Edit menu) and then look at the Packaging section. In there you can add your directory under the "Additional Non-Asset Directories to Package).
ok, so I renamed the “Levels” folder to “Maps”, but I still get the same behavior: Working in editor, black screen when I ‘launch’ it or run the packaged game.
However I noticed something in the console when executing the C++ code:
LogStreaming:Error: Couldn't find file for package /Engine/Maps/Entry requested by async loading code.
I don’t know why the Entry map is requested (I have "/Game/Maps/Transition as transition map) but maybe that’s related to the problem.