- Home /
Scene of index 1 is active when I start game and it should be scene of index 0?
I currently have three scenes in my game, and they are accounted for in the Build Settings as follows:
StartScreen: 0 GamePlay: 1 GameOver: 2
StartScreen has a play button, and once the play button is pressed, GamePlay is loaded and the user can start playing the game.
The problem is that when the StartScreen is open, GameObjects start spawning within GamePlay before the play button is pressed. I also wrote Debug.Log(SceneManager.GetActiveScene().name) in my script which is attached to an object in StartScreen, and it printed out that GamePlay is the active scene.
Any suggestions would be appreciated. ,
Your answer
Follow this Question
Related Questions
How can I change to next stage when current stage is completed(in case of multiple scenes)? 0 Answers
Cannot close/unload a scene that is open in editor during playmode (using C# code)? 3 Answers
Using scene created with SceneManager.CreateScene during runtime 0 Answers
Loading bar for NEXT scene/level... 1 Answer
How can I make a loading screen with LoadSceneAsync 2 Answers