- Home /
How to create a new scene and load it through c# script ?,How to create a new scene and load it through c# script
I am making a sandbox game and I want player to be creating new worlds aka scenes in unity manually. I have gone through many pages of google but I was not able to find out how to do this. Please if you know the solution to this, please give me a reply. ,
Answer by antonsem · Jan 13, 2020 at 02:23 PM
This line will create a new scene, and set it as an active scene:
SceneManager.SetActiveScene(SceneManager.CreateScene("NewScene"));
Note that this does not change what is rendered and only means that any Insanitation / etc happens on this scene. It won't be shown on screen (see https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.SetActiveScene.html )
Your answer
Follow this Question
Related Questions
how to listing all game objects in GUI.Box? 1 Answer
Add GUI elements to Scene View? 3 Answers
Distribute terrain in zones 3 Answers
How To Put 2 Panel in 1 scene? 2 Answers
Change Scene by answering right 3 Answers