private void Awake() { if (instance != null) { Destroy(gameObject); return; } else { instance = this; DontDestroyOnLoad(gameObject); } }
// Start is called before the first frame update void Awake() { if (INSANCE == null) { INSANCE = this; bestScore = 0; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }