Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity how to see what scen you are in

       void Update()
     {
     if (SceneManager.GetActiveScene () == SceneManager.GetSceneByName ("scene1")) 
         {
         SceneManager.LoadScene ("scene2");
         }
 
  else if (SceneManager.GetActiveScene () == SceneManager.GetSceneByName ("scene2"))
         {
         SceneManager.LoadScene ("scene1");
         }
     }
 
PREVIOUS NEXT
Tagged: #unity #scen
ADD COMMENT
Topic
Name
2+3 =