unity how to load a scene
using UnityEngine.SceneManagement;
//Put this in whenever you want to load a scene
SceneManager.LoadScene("Scene name");
3.5
4
SceneManager.LoadScene("Game");
Thank you!
4
0
4
3
SceneManager.LoadScene (sceneBuildIndex:/*Put the number here*/);
Thank you!
3
0
3.67
3
using UnityEngine.SceneManagement
public class LoadScene : MonoBehavior
{
public string sceneToLoad = "Level2";
public void Start()
{
SceneManager.LoadScene(sceneToLoad);
}
}
Thank you!
3
0
3
1
using UnityEngine.SceneManagement;
int buildIndex = 0;
//Load the scene with a build index
SceneManager.LoadScene(buildIndex);
Thank you!
1
0
Are there any code examples left?
New code examples in category C#