Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity check load scene

  void Start ()
     {
         // Create a temporary reference to the current scene.
         Scene currentScene = SceneManager.GetActiveScene ();
 
         // Retrieve the name of this scene.
         string sceneName = currentScene.name;
 
      
         }

void Update(){
     if (sceneName == "Example 1") 
         {
             // Do something...
         }
}
 
PREVIOUS NEXT
Tagged: #unity #check #load #scene
ADD COMMENT
Topic
Name
5+2 =