I’m attempting to open a new level (InGame) after finishing up with the previous level (MainMenu), however the process of creating a widget and then subsequently adding it to the viewport is seemingly being ignored by blueprint. These steps have worked with no issues on the MainMenu level widgets.
I’ve been trying to fix this issue for days now and I just can’t seem to crack it. Any help at all would be massively appreciated.
Before anyone asks: I have adding print strings in every step of the process to see if it’s failing at any point but it all is firing, just not being executed.
When you call the open level node, it just opens the new level and -BOOM- that’s it. Nothing else runs, because you’re in a new level.
If you want to carry on running code after opening a level, there are two ways:
Use level streaming. Instead of the ‘open level’ node, you use ‘load streaming level’, but you have to change you game structure to do this. You can find out about it here:
2) You have to somehow pass information to the new level, so it knows it has to run some code. In this case, sorting out the players and slapping a widget on the screen.
You could just tell all levels to do that on begin play, that’s the easiest way. A little more flexible would be something using the game instance, because that’s the only thing that doesn’t go in the bin when you call ‘open level’.