Answers for "how to load a scene in unity c#"

C#
26

unity load scene

using UnityEngine.SceneManagement;

//Put this in whenever you want to load a scene
SceneManager.LoadScene("Scene name");
Posted by: Guest on March-23-2020
13

unity load scene

using UnityEngine.SceneManagement;

int buildIndex = 0;
//Load the scene with a build index
SceneManager.LoadScene(buildIndex);
Posted by: Guest on April-18-2020
4

unity how to load up a scene

SceneManager.LoadScene("scene_01");
Posted by: Guest on January-17-2020
4

load scene unity

using UnityEngine.SceneManagement


public class LoadScene : MonoBehavior
{
	public string sceneToLoad = "Level2";
    
    public void Start()
    {
    	SceneManager.LoadScene(sceneToLoad);
    }
}
Posted by: Guest on June-22-2020
2

loadscene unity

using UnityEngine;
using UnityEngine.SceneManagement;

public class Singleplayer : MonoBehaviour
{
    public void LoadNextLevel()
    {
    	//This will load the next scene in the buildIndex, e.g if in scene 3, go to scene 4
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex +1);
    }
}
Posted by: Guest on July-11-2020
2

unity how to load a scene

SceneManager.LoadScene("Game");
Posted by: Guest on February-13-2020

C# Answers by Framework

Browse Popular Code Answers by Language