unity load scene

Code Example - unity load scene

                
                        using UnityEngine.SceneManagement;

//Put this in whenever you want to load a scene
SceneManager.LoadScene("Scene name");
                    
                
 

reload scene unity

                        
                                using UnityEngine.SceneManagement;

	SceneManager.LoadScene(SceneManager.GetActiveScene().name);
                            
                        
 

unity reload current scene

                        
                                using UnityEngine.SceneManagement;
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
                            
                        
 

unity reload scene

                        
                                SceneManager.LoadScene(SceneManager.GetActiveScene());
                            
                        
 

load scene unity

                        
                                using UnityEngine.SceneManagement


public class LoadScene : MonoBehavior
{
	public string sceneToLoad = "Level2";
    
    public void Start()
    {
    	SceneManager.LoadScene(sceneToLoad);
    }
}
                            
                        
 

unity how to load up a scene

                        
                                SceneManager.LoadScene("scene_01");
                            
                        
 

unity how to load a scene

                        
                                SceneManager.LoadScene("Game");
                            
                        
 

unity scene load

                        
                                using UnityEngine.SceneManagement;

//Put this in whenever you want to load a scene
SceneManager.LoadScene("Scene name");
                            
                        
 

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);
    }
}
                            
                        
 

open scene unity

                        
                                using UnityEngine.SceneManagement;

SceneManager.LoadScene(string sceneName);
//OR
SceneManager.LoadScene(int sceneBuildIndex);
                            
                        
 

how to change scenes in unity

                        
                                using System.Collections; 
using System.Collections.Generic; 
using UnityEngine; 
using UnityEngine.SceneManagement;

public class SceneScript {
  public void ChangeScene(string scene = "") {
    SceneManager.LoadScene(sceneName:"scenes Name");
  }
}
                            
                        
 

how to change scenes on collision unity

                        
                                void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
         SceneManager.LoadScene (2);
 }
                            
                        
 

unity how to refrsh scene

                        
                                SceneManager.LoadScene(SceneManager.GetActiveScene().name);
                            
                        
 

change scene unity

                        
                                SceneManager.LoadScene("name of scene", LoadSceneMode.Single);
                            
                        
 

scenemanager.loadscene

                        
                                SceneManager.LoadScene(scenename);