public void OnButtonClick() { //Flags for flight Attendant if (flag == "keyCard") { sceneManager.keyCardBrought = true; } else if (flag == "alcoholOffered") { sceneManager.drinkOffered = true; } if (flag == "refused") { sceneManager.drinkOffered = false; } //Flags for Passenger if (flag == "grabToy") { sceneManager.grabToy = true; } //Switch Scene sceneManager.GetComponent <MySceneManager>().SwitchScreen(targetScreen); }