When I load a scene a second time, some objects don't show up
I have two scenes: Menu and Game. I'm using C#.
When you die in the game, you get sent back to the menu with
SceneManager.LoadScene("Menu");
There's a script with a GUIButton in the menu that, when clicked, loads the game with
SceneManager.LoadScene("Game");
What I want to happen is that when I click the button in the menu scene, it loads the game as if I just clicked the play button with the game scene open in the editor.
What instead happens is that it goes to the game scene, but some objects from the game scene appear to be missing. I'm not using DontDestroyOnLoad() anywhere.
Some objects from the scene do appear, but others don't. The weirdest thing is that there are some data fields on a script on the missing object that are referred to by some other scripts, and those give values that make sense.
Does anyone have any idea what's going on, or what I can do to get the desired result?
Your answer
Follow this Question
Related Questions
changing scene not working? 0 Answers
Why is my scene not loading? 2 Answers
Multiple active scenes updating but not rendering? 0 Answers
How do I use 3 scenes (menu and 2 maps) while only leaving the current scene and menu active? 0 Answers
Game crashes after button is clicked to load scene 0 Answers