- Home /
What is happening to scene manager.loadscene???
Can Anyone tell me why this is happening? I'm using the new Scenemanager.LoadScene() function but when the scene switches (the player is dead) to go to a you lose scene to play again, the scene just loops back and forth in the hierarchy pane...
It would seem like something is wrong in the logic of the losing scene that is sending it back to the game scene. Could you post the code that moves you from the losing scene back to the game scene?
Thanks for the hint... I suspected that it was some logic but it was escaping me. I had a singleton that I wanted to survive scenes (wrote some code similar on another project) but, I put some logic in it that was putting it in the loop like you mentioned (tried something new in the script).
The singleton is not necessary so I removed the code that was allowing the singleton to survive and presto! Problem was the logic in the previous scene, specifically the singleton was checking a value that was carried over into the next scene.
Thanks again for replying... it gave me some fresh eyes to look through...
Your answer
Follow this Question
Related Questions
SceneManager.LoadScene not working with button 1 Answer
Switching between several levels 1 Answer
Problem in loading death menu scene 1 Answer
Scene freezes after loaded 1 Answer