If Level2 is in streaming list of loaded map Level1 (Editor->Window->Levels), then if i try to use: UGameplayStatics::OpenLevel(…Level2…), then editor freezes.
PlayInEditor.
PS: i am expecting Log warning message (like when i LoadStreamLevel on non-stream level), but not freez.
Does the editor crash or simply become unresponsive? If it is crashing can you post the logs from the crash for me to see? If it is only freezing without crashing can you try running the project through Visual Studio’s debugger and causing the freeze then?
Additionally, does the crash happen in a new project with no extra content other than the multiple levels? Here are the steps I took to test this myself, let me know if this is what you’re doing or if there’s something I’m missing.
Create two new levels
With Level1 as the current level, I went to Window->Levels
Drag Level2 from content browser to Levels list to add it below Persistent Level
Open Level Blueprint and add call to Open Level Node set to Level2.
Yes, exactly that steps.
But i dont use blueprints, i call UGameplayStatics::OpenLevel from C++, i simply create Button in MyHUD with OnClicked event, MyHUD is inside Level1 PlayerController. Then i press PIE, Level1 is loaded with my button, i press button and: Editor is freezed, if i open WindowsProcessManager i see that UE4Editor continue allocating memory, like when memory leak, so i just close process. (i dont wait crash, its too long, and i dont want to have 0 free memory).
I’ve tested Blueprint version with same scenario, i created trigger volume and use OpenLevel with begin overlap event. When i overlap trigger, I’ve got not feeez, but crash instead:
I have bugged the behavior of Open Level (freezing/crashing when called) for investigation. (UE-18588) Though the behavior is slightly different it’s likely that both the freeze and crash are related