Problems when game scene is played more than once.
I'm working on a 2D visual novel game which is almost finished however there is a problem when I play the game a second time, third time and so on.
The first time the play button is pressed in the menu scene, everything runs fine and everything appears how it should. It's only when I finish the game and press play a second time, objects such as name tags will appear instantly rather than being triggered later on in the game. Other strange things such as layers being changed and 1 object actually being hidden from the start. It just becomes a horrible mess when it's loaded a second time.
I imagine I need a way of when the main menu scene is loaded or arrived at, the game scene is refreshed?
I'm using the Fungus plugin for this game. The only two scenes I have in the game are the menu scene and game scene.
//Play button code// SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
Edit: it seems as if the problematic objects are in the "DoNotDestroyOnLoad" hierarchy when played in the editor.
Thanks.