Created
October 3, 2016 02:52
-
-
Save unity3dcollege/7359ab9e781367318ea575468d339e3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class SceneLoadedListener : MonoBehaviour | |
{ | |
private void Start() | |
{ | |
SceneManager.sceneLoaded += HandleSceneLoaded; | |
} | |
private void HandleSceneLoaded(Scene arg0, LoadSceneMode arg1) | |
{ | |
string logMessage = string.Format("Scene {0} loaded in mode {1}", arg0, arg1); | |
Debug.Log(logMessage); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment