private void Awake() { if (s_Instance == null) { s_Instance = this; //DontDestroyOnLoad(this.gameObject); } //else //Destroy(gameObject); }
private void Awake() { if (s_Instance == null) { s_Instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(gameObject); } m_Fader = GetComponentInChildren <Image>(); }
private void Start() { scene = FindObjectOfType <Sceneloader>(); scoreText.text = score.ToString(); }