Skip to content

Instantly share code, notes, and snippets.

@unity3dcollege
Created October 3, 2016 02:52
Show Gist options
  • Save unity3dcollege/7359ab9e781367318ea575468d339e3c to your computer and use it in GitHub Desktop.
Save unity3dcollege/7359ab9e781367318ea575468d339e3c to your computer and use it in GitHub Desktop.
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