public void ApplyChanges() { if (speechAutoPlayToggle.isOn) { GameInformation.SpeechAutoPlay = true; SaveInformation.SaveAllInformation(); Debug.Log(GameInformation.SpeechAutoPlay); } else { GameInformation.SpeechAutoPlay = false; SaveInformation.SaveAllInformation(); } if (colorblindModeToggle.isOn) { GameInformation.ColorblindMode = true; SaveInformation.SaveAllInformation(); cbm = GameObject.Find("ColorblindManager").GetComponent <ColorblindManager>(); cbm.UpdateColorScheme(); } else { GameInformation.ColorblindMode = false; SaveInformation.SaveAllInformation(); SceneManager.LoadScene(14); Debug.Log(GameInformation.SpeechAutoPlay); } }
// Use this for initialization void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }