//private AdManager adManager; private void Start() { gameManager = FindObjectOfType <GameManager>().GetComponent <GameManager>(); auManager = FindObjectOfType <AudioManager>().GetComponent <AudioManager>(); //adManager = FindObjectOfType<AdManager>().GetComponent<AdManager>(); settingsVal = FindObjectOfType <settingsValue>().GetComponent <settingsValue>(); music_toggle.isOn = settingsVal.music; SFX_toggle.isOn = settingsVal.SFX; }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } DontDestroyOnLoad(this.gameObject); }