I have setup a blueprint in the game instance to fully unload out all my sub levels then my persistence level. This seems to work just fine. However, In a few sections of my game where triggers are spawned in seem to break on replaying a new game. The player would have to fully close out the game and reopen it for them to play it again which is not ideal. I want to to be able just to click the main menu and be able to play again from there.
From my understanding spawned actors are attached to the persistence level if you don’t give it a owner. Unloading and reloading the persistence level does not seem to work.
Spawning always takes place in the persistent, even when the actor is given an owner. Giving the actor an owner just ensures that it will die when the owner dies.
In fact, looking at the code you have there, all you need to do is the ‘open level’ because that will throw everything away. Including the game instance, I think maybe that’s your problem?
So just going to “open level” worked for me in the editor so far. I’ll pack a build tonight and come back with the results since packed versions like to have a mind of their own lol.
Ok from further testing both ways actually work. What I’m now running into is a widget bug that basically turns the screen black on the second playthrough for some reason.