I am having a weird issue with the load level blueprint node. So the map I’m trying to load will work fine if I load it using the editor. (While in the editor) it doesn’t matter which style of play button I use (even standalone) it crashes every single time. However if I package the project, it loads just fine when not being run with the engine anymore. Any help would be great.
I tried adding a Game instance and calling load level inside of that and no change
Sorry I changed my reply as you were typing this. I went ahead and watched a video and added a game instance and tried calling the level load inside of the game instance. But there was no change. It still behaving the exact same way. Side note I have used breadcrumbs to siphon through the code. Its literally that call to open level that causes it to crash.
Not in the Menu.umap But in the main.umap yes its been heavily modified . There are a bunch of calls for trigger boxes to stream in and stream out levels.
I’m not sure if this will fix the issue, but you should open the level inside the Game Instance, since it is persistent on level load. Let me know if this works, or if you need more information.
Go to “Project Settings → Maps & Modes → Default Modes”. There you can change and create default classes for GameMode, Pawn, GameInstance, etc. (This thread has some more info on what to use for what) Inside the game instance you would create a function e.g. “LoadLevel” inside that function use OpenLevel. You can call the function by using the “GetGameInstance” node and casting to your custom GameInstance. I hope this helps.
Odd. Have you modified the Level Blueprint?
p.s. No worries, I get ninja’d a lot.
You could try to fix up the re-directors (right click on content folder → Fix Up Redirectors in Folder).
If that does not help: Have you tried disconnecting some of the code in the level blueprint?
EDIT: you could also change the way you handle the level streaming: make a blueprint that contains the trigger box, create the necessary variables (name/object reference, location, rotation) and expose these variables by checking “Instance Editable” under the variable details tab. Then hook up the streaming logic to the overlap event inside the new BP. Then you can change which level is loaded inside the level editor for every box without using the level blueprint.
I tried cutting all the code out in the level blueprint. No change. So I pasted it all back in. I have tried fix re-directors and no change.
Since you are certain the level loading node is what causes it, the last two ideas I have here are:
- An object in the level itself crashes it.
- The level-file is somehow corrupted and this gets fixed by packaging it.
You could try with a new map, copy a few objects into the new map, load this new map instead of the one that crashes, repeat until it either crashes or everything is inside the new map.
What I have discovered is this crash only happens when I transition from menu to main. If I transition from main to menu there is no crash.