// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { sceneChanger scene = GameObject.FindObjectOfType(typeof(sceneChanger)) as sceneChanger; scene.MenuScene(); } }
void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Debug.Log("ASDFASDF"); sceneChanger sch = GameObject.FindObjectOfType(typeof(sceneChanger)) as sceneChanger; if (sceneName == "database") { sch.MapScene(); } else if (sceneName == "MySubject" || sceneName == "AddRoutine") { sch.MenuScene(); } } }