So, from what I can tell there is two ways we can transition between levels.
Method 1: We start in one level and then using ‘Open Level’ open an entirely new map.
Method 2: We have a persistent level and streaming levels, and we load the streaming ones into the persistent level.
My issue is, I have a main game map, and occasionally the player encounters a monster and then enters into a battle mode.
My first instinct was to create two different levels one for the main game and one for the battle level. Each with their own game mode, state, ect, since they logically should. Since the Game Mode dictates the rules of the game, and they are different when in the Main Game than in the Battle mode.
However, the only way to do that is to use method 1 above. I would make the first level have a ‘MainGameMode’ and the second level a ‘BattleGameMode’, and using Open level they will transition successfully. However, in this scenario, how do I keep my data UObjects alive between level transitions? I don’t want to have to save to file and load in the next level.
If I do level streaming, it appears to be only possible to have one Game mode in that way (which makes sense). I could put everything in the same Game mode, but it would be nice to keep things more logically separate.
Whats the best way to handle this? Is there any way to persist UObjects between levels safely?
And a little left field, but is there a way to animate a transition between two levels?