// Use this for initialization void Awake() { isOpen = true; menu_button.GetComponent <Button>().onClick.AddListener(() => { OpenCloseMenu(menu_panel, ref isOpen); }); SceneLink scene = jSONLoader.GetSceneLink(SceneManager.GetActiveScene().name); buttons[CONTINUE_BUTTON_INDEX].GetComponent <Button>().onClick.AddListener(() => OpenCloseMenu(menu_panel, ref isOpen)); buttons[AR_BUTTON_INDEX].GetComponent <Button>().onClick.AddListener(() => LoadScene.LoadSceneByName(scene.ARsceneLink)); buttons[VR_BUTTON_INDEX].GetComponent <Button>().onClick.AddListener(() => LoadScene.LoadSceneByName(scene.VRsceneLink)); buttons[EXIT_BUTTON_INDEX].GetComponent <Button>().onClick.AddListener(() => LoadScene.LoadSceneByName(prevScene)); }