Question by 
               Toothless_ · Jun 14, 2016 at 04:15 PM · 
                scripting problemscene-loading  
              
 
              Scene created from a script gives an error when tried to load
So I have made a script that makes a scene from a script and then loads it but for some reason I get this error:

and here is the script:
 SceneManager.CreateScene("Floor" + GameManager_RoomCount.gameManagerRoomCount.floor);
             SceneManager.UnloadScene("Floor" + (GameManager_RoomCount.gameManagerRoomCount.floor - 1));
             SceneManager.LoadScene("Floor" + GameManager_RoomCount.gameManagerRoomCount.floor, LoadSceneMode.Single);
(I have imported scene management)
The script makes the next scene, unloads the current scene then loads the scene that has just been created. I don't know why it is giving me an error.
 
                 
                error.png 
                (6.1 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Jessespike · Jun 14, 2016 at 05:52 PM
To use LoadScene, the scene must be included in the build settings as documented. Have you tried SetActiveScene?
Your answer
 
 
             Follow this Question
Related Questions
Any help 'updating' this script? 0 Answers
how to fix countdown bug after reset level? 0 Answers
How to run a script twice in a scene 0 Answers
How can I find a disabled/inactive GameObject? 0 Answers
Scene is loading in Game Mode, but not in the build. Why? 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                