Unity - Scripting API: SceneManagement.SceneManager.SetActiveScene
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Parameters
| Parameter | Description |
|---|---|
| scene | The Scene to be set. |
Returns
bool Returns false if the Scene is not loaded yet.
Description
Set the Scene to be active.
The active Scene is the Scene which will be used as the target for new GameObjects instantiated by scripts and from what Scene the lighting settings are used. When you add a Scene additively (see LoadSceneMode.Additive), the first Scene is still kept as the active Scene. Use this to switch the active Scene to the Scene you want as the target.
There must always be one Scene marked as the active Scene. Note the active Scene has no impact on what Scenes are rendered.